@devite/nuxt-sanity
v2.17.0
Published
Advanced Sanity integration for Nuxt.js.
Readme
Nuxt Sanity Integration
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-sanityThat'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
# 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