More Premium Hugo Themes Premium Vue Themes

Sanity

Sanity integration for Nuxt

Sanity

Sanity integration for Nuxt

Author Avatar Theme by nuxt-modules
Github Stars Github Stars: 240
Last Commit Last Commit: May 20, 2025 -
First Commit Created: Dec 18, 2023 -
default image

Overview:

The @nuxtjs/sanity package is a Sanity integration for Nuxt.js, a framework for building Vue.js applications. It allows developers to easily connect their Nuxt.js project with Sanity, a customizable content platform. This integration offers features such as an ultra-lightweight Sanity client, zero-config image/file components, portable text renderer, and support for GROQ syntax highlighting. The package is compatible with both Nuxt 2 and Nuxt 3, making it a flexible choice for developers using either version of Nuxt.js. The @nuxtjs/sanity package is released under the MIT License.

Features:

  • Just bring your sanity.json - 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

Installation:

To install the @nuxtjs/sanity package, follow these steps:

  1. Add the @nuxtjs/sanity dependency to your project:
npm install @nuxtjs/sanity
  1. Add @nuxtjs/sanity to the modules section of your nuxt.config.ts file.
  2. For Nuxt 2 support without Bridge, you can install @nuxtjs/sanity@0.10.0 and follow the instructions at https://v0.sanity.nuxtjs.org.

If you are developing with this package, you can clone the repository and install the dependencies using pnpm install. Then, you can stub the module with pnpm dev:prepare and start the development server using pnpm dev.

Summary:

The @nuxtjs/sanity package provides an easy way to integrate Sanity with Nuxt.js projects. It offers various features, such as a lightweight Sanity client and support for GROQ syntax highlighting. The installation process is straightforward, requiring minimal configuration. Whether you are using Nuxt 2 or Nuxt 3, this package is compatible and can streamline the development process of connecting Nuxt.js with Sanity. The @nuxtjs/sanity package is released under the MIT License, allowing developers to use it for both personal and commercial projects.