Nuxt3 中文课程《实战全栈开发简书》限时优惠

This module is not yet compatible with Nuxt 3

Head over to v2.nuxt.com

sanity
sanity

Access text, images, and other media with Nuxt and the Sanity headless CMS.

@nuxtjs/sanity

Nuxt Sanity

npm versionnpm downloadsCodecovLicenseNuxtVolta

Sanity integration for Nuxt

Features

  • Just bring your sanity.config.ts - no additional configuration required
  • Ultra-lightweight Sanity client
  • Zero-config image/file components + portable text renderer
  • Supports GROQ syntax highlighting
  • Nuxt 3 and Nuxt Bridge support

📖  Read more

Quick setup

  1. Add @nuxtjs/sanity dependency to your project
npx nuxi@latest module add sanity
  1. Add @nuxtjs/sanity to the modules section of nuxt.config.ts
{
  modules: [
    '@nuxtjs/sanity',
  ],
  sanity: {
    // module options
  }
}

Note: For Nuxt 2 support without Bridge, install @nuxtjs/sanity@0.10.0 and follow the instructions at https://v0.sanity.nuxtjs.org.

Development

  1. Clone this repository
  2. Install dependencies using pnpm install
  3. Stub module with pnpm dev:prepare
  4. Start development server using pnpm dev

License

MIT License