Skip to main content
Create the API composable, runtime config, and blog pages for Nuxt 3.

Create the API composable

Create composables/useThestacc.ts:

Add runtime config

In your nuxt.config.ts:
Keeping thestaccApiKey outside the public block means it stays server-side and never ships to the browser.

Create the blog listing page

Create pages/blog/index.vue:

Create the blog detail page

Create pages/blog/[slug].vue:
v-html renders the HTML content directly. Style the .blog-content class in your CSS to match your site’s design.

Static generation

For static export on Cloudflare Pages, Vercel, or Netlify, run:
Nuxt pre-renders all pages at build time — the output is pure static HTML with the same SEO as any other static site generator.