Skip to main content

Overview

This guide uses:
  • Astro 5.x
  • Server-side fetch in frontmatter
  • Static blog index and dynamic post pages via getStaticPaths

1. Configure environment variables

2. Add a CMS client helper

Create src/lib/skayle-cms.ts:

3. Build blog listing page

Create src/pages/blog/index.astro:

4. Build dynamic blog detail page

Create src/pages/blog/[slug].astro:

5. Static build flow

Run a static build with:
Astro generates listing and post pages from Skayle CMS data at build time. For frequent content updates, schedule regular builds or use Astro hosting features that support on-demand rendering.

6. Use non-article collections (optional)

If you enabled additional collections/content types in Skayle CMS, fetch them via collection-scoped items. Non-article collections are available on the Authority plan.
/posts still works as a backward-compatible alias, but new code should use /articles.