Index of every page on this site: llms.txt
All skills
onmax avatar

/nuxt-content

@2e74504 official
by Maxonmax/nuxt-skills722 stars
38
Run it yourself

Build typed, content-driven Nuxt applications with @nuxt/content. Use when working with content.config.ts, collections, queryCollection, Markdown or MDC rendering, content databases, hooks, custom sources, search, or Content v2 migrations.

Use this Skill: https://skilld.dev/gh/onmax/nuxt-skills/nuxt-content

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesrendering.md

≈681 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Rendering

ContentRenderer

Query a page document, handle the missing state at the route boundary, then pass the document to ContentRenderer.

<script setup lang="ts">
const route = useRoute()
const { data: page } = await useAsyncData(route.path, () => {
  return queryCollection('docs').path(route.path).first()
})

if (!page.value) {
  throw createError({ statusCode: 404, statusMessage: 'Page not found' })
}
</script>

<template>
  <ContentRenderer :value="page" />
</template>

Nuxt Content v3 renders documents through ContentRenderer; document-driven routing still belongs in an explicit Nuxt page such as app/pages/[...slug].vue.

MDC components

Components under components/content/ are available in Markdown and MDC.

:icon{name="lucide:star"}

::callout{type="warning"}
Review this before publishing.
::

::card
#title
Typed collections

#default
The body is rendered through the default slot.
::

Use native slots in content components. The mdc-unwrap attribute removes Markdown wrapper elements when a component needs the raw slot shape.

<template>
  <aside class="callout">
    <slot mdc-unwrap="p" />
  </aside>
</template>

Content components are registered for MDC rendering. Register them separately when they also need dynamic use outside Markdown.

Prose components

Override semantic Markdown output with ProseP, ProseA, ProseH1–ProseH6, ProseCode, ProsePre, ProseImg, ProseTable, and the matching list/blockquote components. Inline code maps to ProseCode; fenced code maps to ProsePre.

Keep accessible HTML semantics and forward the attributes supplied by MDC. Let a design-system skill own styling decisions when Nuxt UI or another component library is installed.

Markdown processing and highlighting

Configure Markdown under content.build.markdown and renderer aliases under content.renderer.

export default defineNuxtConfig({
  content: {
    build: {
      markdown: {
        toc: { depth: 3, searchDepth: 2 },
        highlight: {
          themes: {
            default: 'github-light',
            dark: 'github-dark',
          },
          langs: ['ts', 'vue', 'bash'],
        },
      },
    },
    renderer: {
      alias: { a: 'DocsLink' },
      anchorLinks: { h2: true, h3: true },
    },
  },
})

Load only the Shiki languages used by the content set. When custom remark or rehype plugins are involved, verify the rendered AST and the final SSR HTML.

Official references: Markdown and MDC, ContentRenderer, prose components.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning1mo5 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    The skill provides guidance for using the Nuxt Content module. It correctly emphasizes the use of environment variables for managing sensitive tokens and database credentials. However, the skill’s core functionality involves ingesting data from external sources such as Git repositories and APIs, which introduces a potential surface for indirect prompt injection if those sources are compromised.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: MEDIUM · 1 issue

  • Runlayer8mo

    6 files scanned · No issues

  • ZeroLeaks6mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 2e74504. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last week.

Activeupdated 4 months ago

README badge

README badge for onmax/nuxt-skills/nuxt-content

Provides guidance for Nuxt Content v3 collections, querying, and rendering—including typed schemas, SQL-backed queries with queryCollection, MDC components, database configuration, and NuxtStudio integration. Use this when building content-driven Nuxt apps with markdown or structured data sources.

Generated from the current SKILL.md.

Does this skill cover NuxtStudio integration?
Yes. The skill includes guidance on NuxtStudio integration, preview mode, and live editing via the studio.md reference file.
Can I use remote content sources like GitHub repos?
Yes. The skill covers defineCollectionSource and source.repository patterns for pulling content from external APIs and GitHub repositories.
Does this skill handle i18n for multi-language content?
Yes. The skill includes patterns for i18n multi-language content setup.
What databases are supported for content storage?
The skill covers configuration for SQLite, PostgreSQL, D1, and LibSQL.
Is this for general Nuxt development or specifically content-driven apps?
This skill is specifically for content-driven Nuxt apps. For general Nuxt basics, use the nuxt skill instead.

Generated from the current SKILL.md. These answers refresh after source changes.