Retrieves all blog posts from the posts content directory
Main entry point for fetching blog posts with optional locale filtering. Automatically resolves the posts directory path from the project root.
Optional
Optional locale code (e.g., 'ja', 'en') to filter posts by language
Array of blog post objects with metadata, slug, and content
// Get all blog postsconst allPosts = getBlogPosts()// Get only Japanese postsconst jaPosts = getBlogPosts('ja')// Access post dataallPosts.forEach(post => { console.log(post.metadata.title) console.log(post.slug) console.log(post.content)}) Copy
// Get all blog postsconst allPosts = getBlogPosts()// Get only Japanese postsconst jaPosts = getBlogPosts('ja')// Access post dataallPosts.forEach(post => { console.log(post.metadata.title) console.log(post.slug) console.log(post.content)})
Retrieves all blog posts from the posts content directory
Main entry point for fetching blog posts with optional locale filtering. Automatically resolves the posts directory path from the project root.