# Posts — BrandApp Playground

> List and fetch posts, including the slug-addressed detail route with generateMetadata.

- Canonical page: https://brandapp-playground.vercel.app/cms/posts
- Markdown: https://brandapp-playground.vercel.app/cms/posts.md
- SDK module: `@reopt-ai/brandapp-sdk/cms`

## API

- `sdk.cms.posts.list({ status, page, limit, sortBy, sortOrder })`
- `sdk.cms.posts.get(postId)`
- `sdk.cms.posts.getBySlug(slug)`

## Detail route

`/cms/posts/{slug}` calls `getBySlug` exactly once in a Server Component and derives both
the rendered body and the page metadata from that single response. `toMetadata()` turns
the post into a Next.js `Metadata` object, and `document.contentRich` is an `EditorSpec`
that `opt-editor` renders directly.

This is the pattern an external marketing site can lift wholesale for its own
`/blog/[slug]` route.

## Related

- [SEO, Sitemap, and RSS](https://brandapp-playground.vercel.app/cms/seo.md)
- [Tags](https://brandapp-playground.vercel.app/cms/tags.md)
- [CMS Hooks](https://brandapp-playground.vercel.app/hooks/cms.md)

---

Index of every document: https://brandapp-playground.vercel.app/llms.txt
Single-file copy: https://brandapp-playground.vercel.app/llms-full.txt
HTTP API description: https://brandapp-playground.vercel.app/openapi.json
