@devite/nuxt-sanity
TypeScript icon, indicating that this package has built-in type declarations

2.12.0 • Public • Published

Nuxt Sanity Integration

npm version

Advanced Sanity integration for Nuxt.js. Based on the official @nuxtjs/sanity module.

Quick Setup

Install the module to your Nuxt application with one command:

npx nuxi module add @devite/nuxt-sanity

That's it! You can now use Sanity with your Nuxt app ✨

Configuration

Further configuration can be done in the nuxt.config.ts file:

export default {
  modules: [
    '@devite/nuxt-sanity',
    "@nuxt/image"
  ],
  sanity: {
    projectId: 'YOUR_PROJECT_ID',
    dataset: 'YOUR_DATASET',
    ...
  },
  runtimeConfig: {
    public: {
      // Required for SanityPage component to set a correct "canonical" url
      baseUrl: "https://www.example.com"
    }
  }
};

Contribution

Local development
# Install dependencies
pnpm install

# Generate type stubs
pnpm dev:prepare

# Generate module types and build the module
pnpm prepack

# Develop with the playground
pnpm dev

# Build the playground
pnpm dev:build

# Run ESLint
pnpm lint

# Run Vitest
pnpm test
pnpm test:watch

# Release new version
pnpm release

Readme

Keywords

none

Package Sidebar

Install

npm i @devite/nuxt-sanity

Weekly Downloads

28

Version

2.12.0

License

MIT

Unpacked Size

68.9 kB

Total Files

74

Last publish

Collaborators

  • jgeramb