Dev Roar Lab API Documentation - v1.6.0
    Preparing search index...
    • 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.

      Parameters

      • Optionallocale: string

        Optional locale code (e.g., 'ja', 'en') to filter posts by language

      Returns { metadata: Metadata; slug: string; content: string }[]

      Array of blog post objects with metadata, slug, and content

      // Get all blog posts
      const allPosts = getBlogPosts()

      // Get only Japanese posts
      const jaPosts = getBlogPosts('ja')

      // Access post data
      allPosts.forEach(post => {
      console.log(post.metadata.title)
      console.log(post.slug)
      console.log(post.content)
      })