Gridsome Source Sanity

screenshot of Gridsome Source Sanity
gridsome
sanity

Sanity source plugin for Gridsome

Overview

The gridsome-source-sanity plugin is a source plugin for Gridsome that allows users to fetch data from a Sanity.io GraphQL API. It requires Gridsome version 0.7.1 or above.

Features

  • Basic usage: Easily fetch data from a Sanity.io GraphQL API for your Gridsome project.
  • Options: Configure plugin options such as projectID, dataset, authentication token, and more.
  • Preview of unpublished content: Use the overlayDrafts option to display draft versions of content in your Gridsome site.
  • Raw fields: Utilize raw fields from the Sanity.io API in your Gridsome schema.
  • Portable Text / Block Content: Make use of portable text or block content in your Sanity.io API to create dynamic and flexible content in your Gridsome site.
  • Deploy GraphQL schema: Redeploy the GraphQL API after making changes to the Sanity.io schema to ensure proper fields for your schema types.

Summary

The gridsome-source-sanity plugin is a powerful tool for fetching data from a Sanity.io GraphQL API in a Gridsome project. It allows users to easily configure the plugin with various options and take advantage of features such as previewing unpublished content and utilizing raw fields and portable text. By deploying the GraphQL schema, users can ensure that the proper fields are set for their schema types. With its ease of use and flexibility, the gridsome-source-sanity plugin is a valuable addition to any Gridsome project that utilizes a Sanity.io backend.

gridsome
Gridsome

Gridsome is a Vue.js-based static site generator that makes it easy to build fast and flexible websites and applications by leveraging modern web technologies like GraphQL, Webpack, and hot reloading

sanity
Sanity

Sanity is a fully customizable, API-first, and cloud-based headless content management system that enables developers to manage structured content across multiple channels and platforms.

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.

graphql
Graphql

A website that uses GraphQL as a query language to manage data fetching and state management. This includes features such as a strongly typed schema, client-side caching, and declarative data fetching to streamline data management and optimize website performance.