sanity

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

v1.5.0 by danielroedanielroe

1.5.0 (2022-11-16)

v1.4.1 by danielroedanielroe

1.4.1 (2022-10-23)

Bug Fixes

  • set watch options correctly (b3fbdbd)

v1.4.0 by danielroedanielroe

1.4.0 (2022-10-23)

Features

  • support reactive params in useSanityQuery (df85d36), closes #530

v1.3.2 by danielroedanielroe

1.3.2 (2022-10-17)

Bug Fixes

v1.3.1 by danielroedanielroe

1.3.1 (2022-10-11)

Bug Fixes

  • transpile nitro auto-imports (d77b5df)

v1.3.0 by danielroedanielroe

1.3.0 (2022-09-23)

Features

  • enable groq, useSanity and createSanityClient in server routes (#510) (fdf8353)

Bug Fixes

  • use fresh client independent of isomorphic fetch (#509) (52f0bd3)

v1.2.3 by danielroedanielroe

1.2.3 (2022-06-22)

Bug Fixes

  • render element children directly (2162f7e), closes #422

v1.2.2 by danielroedanielroe

1.2.2 (2022-05-30)

Performance Improvements

  • use $fetch for minimal client (7b7517e)

v1.2.1 by danielroedanielroe

1.2.1 (2022-05-17)

Bug Fixes

  • include both public + private runtime config (3a478ef)

v1.2.0 by danielroedanielroe

1.2.0 (2022-04-20)

v1.1.2 by danielroedanielroe

1.1.2 (2022-04-15)

v1.1.1 by danielroedanielroe

1.1.1 (2022-02-20)

Bug Fixes

  • don't overwrite provided options (e0263e6)

v1.1.0 by danielroedanielroe

1.1.0 (2022-02-20)

⚠ BREAKING CHANGES

  • If you were relying on the auto-disabling part of this module

Bug Fixes

  • add sanity options from runtimeconfig to module defaults (#319) (a167ef2)
  • don't disable module if no projectId is specified (8a5b918)
  • render children of custom components (44bfcab)
  • rework nested list handling (0b18069), closes #266

v1.0.0 by danielroedanielroe

1.0.0 (2022-02-17)

Features

  • migrate module to support nuxt3 and bridge (#316) (2ec11d6)

👉 Migration

v1 of @nuxtjs/sanity requires either Nuxt Bridge or Nuxt 3. (If you are using Nuxt 2 without Bridge, you should continue to use v0.10.)

  1. The main change between Nuxt 2 -> Nuxt 3 is that there is no longer a globally available $sanity helper. If you want to keep the current behaviour, just enable the globalHelper option:
      import { defineNuxtConfig } from 'nuxt3'  export default defineNuxtConfig({    modules: ['@nuxtjs/sanity']    sanity: {+     globalHelper: true    }  })
  2. Instead of adding @nuxtjs/sanity/module you will add @nuxtjs/sanity in your nuxt.config
      import { defineNuxtConfig } from 'nuxt3'  export default defineNuxtConfig({-   modules: ['@nuxtjs/sanity/module']+   modules: ['@nuxtjs/sanity']  })
  3. You should no longer import helpers like groq directly from @nuxtjs/sanity. These will be available automatically throughout your app using the Nuxt auto-imports feature. If you do need to import them directly you can do so by importing from #imports.
      import { groq, useSanity, useSanityQuery } from '#imports'
  4. If you are using <SanityContent> this now no longer renders a wrapper container. If you need the wrapper, you can add it yourself.
      <template>-   <SanityContent :blocks="blocks" />+   <div>+     <SanityContent :blocks="blocks" />+   </div>  </template>    

v0.10.0 by danielroedanielroe

0.10.0 (2021-08-03)

Features

v0.9.4 by danielroedanielroe

0.9.4 (2021-05-15)

Bug Fixes

v0.9.3 by danielroedanielroe

0.9.3 (2021-05-15)

Bug Fixes

v0.9.2 by danielroedanielroe

0.9.2 (2021-04-23)

v0.9.1 by danielroedanielroe

0.9.1 (2021-04-14)

Bug Fixes

  • don't break if no apiVersion is set (0023bfe), closes #120

v0.9.0 by danielroedanielroe

0.9.0 (2021-04-11)

Features

  • add <SanityFile> component to assist with auto-generating file URLs (0b2d353), closes #70

Bug Fixes

  • list rendering fixes for SanityContent (db4408a), closes #102

v0.8.0 by danielroedanielroe

0.8.0 (2021-03-31)

⚠ BREAKING CHANGES

  • @nuxtjs/sanity/module is now how the module should be imported in nuxt.config

Features

  • support sanity apiVersion option (6a2c956)

Bug Fixes

  • add entrypoint for pre-exports support (a053822)

Code Refactoring

v0.7.1 by danielroedanielroe

0.7.1 (2021-02-16)

Bug Fixes

  • exclude .d.ts files from @nuxt/components treatment (df53978), closes #68

v0.7.0 by danielroedanielroe

0.7.0 (2021-01-31)

⚠ BREAKING CHANGES

  • change minimum supported node version to 12

Bug Fixes

  • exclude upath from client bundle (88b7d58), closes #66

Miscellaneous Chores

  • change minimum supported node version to 12 (adcde28)

v0.6.2 by danielroedanielroe

0.6.2 (2021-01-20)

Bug Fixes

  • export types for components (dab55f2)

v0.6.1 by danielroedanielroe

0.6.1 (2021-01-18)

Bug Fixes

  • add default exports for compatibility with @nuxt/components (d48f61a), closes #51
  • hotfix to use backwards-compatible imports (f36a3c4), closes #64

v0.6.0 by danielroedanielroe

0.6.0 (2021-01-17)

Features

  • re-enable autoregistration of components (1af262e), closes #53 #51

Bug Fixes

  • correctly generate url params for sanity images (cb9c223), closes #63
  • get <SanityImage> config from injected config (4d5684f)
  • improve windows compatibility (6efe29a)
  • use nuxt resolver to suppress warnings about missing dependency (b0d7222), closes #33

v0.5.0 by danielroedanielroe

Features

  • disable cdn when enablePreview is called (137149a), closes #45

Bug Fixes

  • don't fail when no sanity object exists in nuxt.config.js (f5ab953), closes #62

v0.4.2 by danielroedanielroe

Bug Fixes

  • correctly use prop in (#52) (7f5eeba)
  • temporarily disable autoregistration of components (b5abd8d), closes #51

v0.4.0 by danielroedanielroe

Features

  • expose generated sanity config within nuxt config for later use (0b4ebe8)
  • use for auto-registration of helper components (4ea5796)

Bug Fixes

  • add name to component for better DX (8d581ce)
  • correctly handle vue keys from portable text (9e6ca61)

v0.3.11 by danielroedanielroe

Bug Fixes

  • set Content-Type header for POST query (c251a21)

v0.3.10 by danielroedanielroe

Features

Performance Improvements

  • use built-in if available (0da5573)

v0.3.9 by danielroedanielroe

Features

  • expose sanity configuration as (35f3e92), closes #19

v0.3.8 by danielroedanielroe

Bug Fixes

v0.3.7 by danielroedanielroe

Bug Fixes

v0.3.6 by danielroedanielroe

Bug Fixes

v0.3.5 by danielroedanielroe

Bug Fixes

  • correct type error of renderless component (b4679f7)

v0.3.4 by danielroedanielroe

Features

  • allow using scoped slots for full control of (c40313d)

v0.3.3 by danielroedanielroe

Features

  • add vetur auto-completion for and (01ddb19)

v0.3.2 by danielroedanielroe

Bug Fixes

v0.3.1 by danielroedanielroe

Features

  • add multiple sanity client capability (0b04120), closes #2
  • allow using to set sanity options (8657d48)

Bug Fixes

  • add default object for (9452722)
  • avoid accidentally including in bundle (7dcbe39)
  • prevent and from being included in client build (e16e297)

v0.3.0 by danielroedanielroe

Features

  • add multiple sanity client capability (0b04120), closes #2
  • allow using to set sanity options (8657d48)

Bug Fixes

  • avoid accidentally including in bundle (7dcbe39)
  • prevent and from being included in client build (e16e297)

v0.2.2 by danielroedanielroe

Bug Fixes

  • build components in format (742cfa1)

v0.2.1 by danielroedanielroe

Bug Fixes

  • correct import path for helper (2aa00c4)

v0.2.0 by danielroedanielroe

Features

  • ✨ add new component to handle portable text (0839b97)
  • allow local import of (762df3c)

Performance Improvements

  • ⚡️ improve options dx and decrease final bundle size (d1c4a76)

v0.1.0 by danielroedanielroe

Features

  • initial sanity module for Nuxt (0b204ee)