---
stable_id: skills/skills-sh-onmax-nuxt-skills-nuxt-content
type: skills
title: skills-sh-onmax-nuxt-skills-nuxt-content
summary: >-
  # Collections

  ## When to Use

  Setting up `content.config.ts`, defining collection schemas, or configuring
  content sources.

  ## Defining Collections

  ```ts

  // content.config.ts

  import { defineCollection, defineContentConfig } from '@nuxt/content'

  import { z } from 'zod'  // Import z from 'zod' directly (not from
  @nuxt/content)

  export default defineContentConfig({
    collections: {
tags:
  - skills-sh
  - skills-sh-all-time
source_url: https://raw.githubusercontent.com/onmax/nuxt-skills/HEAD/skills/nuxt-content/references/collections.md
license: ""
upstream_ref: https://skills.sh/onmax/nuxt-skills/nuxt-content
github_stars: 564
github_forks: 27
github_is_organization: false
retrieved_at: 2026-06-11T08:32:54.266Z
content_sha256: eb10a535052b1ecf968008adaf360e1fb130f229808e83482519b83c78aaae4c
---
