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.

referencesconfig.md

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

Configuration and deployment

Database adapters

Nuxt Content builds a database dump and restores it into the configured adapter at runtime. SQLite is the default.

export default defineNuxtConfig({
  content: {
    database: {
      type: 'sqlite',
      filename: '.data/content/contents.sqlite',
    },
  },
})

Supported adapters include:

  • sqlite with a file path or :memory:; select experimental.sqliteConnector when the runtime needs better-sqlite3, sqlite3, Bun SQLite, or Node's native SQLite.
  • d1 with a Cloudflare binding name.
  • postgresql with pg installed and a connection URL.
  • libsql with @libsql/client, URL, and optional auth token.
  • pglite with @electric-sql/pglite; keep it to development-oriented deployments unless the chosen host provides durable storage.
export default defineNuxtConfig({
  content: {
    database: {
      type: 'd1',
      bindingName: 'CONTENT_DB',
    },
    experimental: {
      sqliteConnector: 'native',
    },
  },
})

Database indexes belong in defineCollection({ indexes: [...] }), because each collection owns its table and query patterns.

Build and renderer options

export default defineNuxtConfig({
  content: {
    build: {
      markdown: {
        toc: { depth: 3, searchDepth: 2 },
        remarkPlugins: {
          'remark-gfm': {},
        },
        rehypePlugins: {
          'rehype-external-links': {
            target: '_blank',
            rel: ['noopener', 'noreferrer'],
          },
        },
        highlight: {
          themes: { default: 'github-light', dark: 'github-dark' },
          langs: ['ts', 'vue', 'bash'],
        },
      },
      csv: { json: true, delimiter: ',' },
    },
    renderer: {
      alias: { a: 'DocsLink' },
      anchorLinks: { h2: true, h3: true },
    },
    watch: { enabled: true },
  },
})

The watcher is a development feature. Transformers are registered under content.build.transformers; load Advanced when processing behavior extends beyond remark/rehype plugins.

Deployment boundary

  • Static generation packages queried content into the generated application.
  • Server and serverless targets restore the generated dump on first query; an in-memory SQLite database is recreated on cold start.
  • Cloudflare Workers use D1 when content must share a durable runtime database.
  • NuxtHub can supply the database configuration through @nuxthub/core; apply the nuxthub skill for provider and binding details.
  • Vercel, Netlify, AWS, Docker, and other targets have provider-specific presets; verify the selected adapter against the deployment filesystem and runtime.

Keep database URLs and tokens in private runtime configuration or build environment variables. Remote collection credentials are build-time inputs; database credentials are runtime inputs when the adapter connects after deployment.

Checks

  • The deployment runtime supports the chosen driver and its peer dependency.
  • Production can restore or reach the database after a cold start.
  • Shiki languages and Markdown plugins are limited to the actual content set.
  • A clean build and a production-mode query both succeed.

Official references: configuration, deployment, NuxtHub.

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.