Skip to main content

Overview

This guide uses:
  • Nuxt 4.x
  • useFetch with server rendering defaults
  • Blog listing + dynamic detail pages
  • Static/prerender-friendly setup

1. Configure environment variables

Update nuxt.config.ts:

2. Add a small CMS client

Create server/utils/skayle-cms.ts:

3. Create blog listing page

Create pages/blog/index.vue:
Create server/api/blog-posts.get.ts:

4. Create dynamic blog detail page

Create pages/blog/[slug].vue:
Create server/api/blog-posts/[slug].get.ts:

5. Static generation guidance

For static output:
  • Use nuxi generate.
  • Keep /blog and /blog/** route rules with SWR/ISR behavior where needed.
  • If you need fully pre-rendered dynamic paths, pre-seed route discovery from /articles during build.

6. Use non-article collections (optional)

For additional content types/collections, call collection-scoped items. Non-article collections are available on the Authority plan.
/posts remains available for backward compatibility, but /articles is the primary endpoint.