Overview
This guide uses:- Nuxt 4.x
useFetchwith server rendering defaults- Blog listing + dynamic detail pages
- Static/prerender-friendly setup
1. Configure environment variables
nuxt.config.ts:
2. Add a small CMS client
Createserver/utils/skayle-cms.ts:
3. Create blog listing page
Createpages/blog/index.vue:
server/api/blog-posts.get.ts:
4. Create dynamic blog detail page
Createpages/blog/[slug].vue:
server/api/blog-posts/[slug].get.ts:
5. Static generation guidance
For static output:- Use
nuxi generate. - Keep
/blogand/blog/**route rules with SWR/ISR behavior where needed. - If you need fully pre-rendered dynamic paths, pre-seed route discovery from
/articlesduring build.
6. Use non-article collections (optional)
For additional content types/collections, call collection-scoped items. Non-article collections are available on theAuthority plan.
/posts remains available for backward compatibility, but /articles is the primary endpoint.