0.0.5 • Published 3 years ago

@nogn/gridsome-source-craft v0.0.5

Weekly downloads
2
License
SEE LICENSE IN LI...
Repository
-
Last release
3 years ago

Craft CMS (GraphQL) source for Gridsome

❗❗ This package is under development. The API will likely change before v1 is released.

GitHub issues

Requires Gridsome v0.7.12 or later

This plugin pairs with the NOGN plugin for Craft CMS

For more information check out nogn.io

Gridsome setup

Install

Yarn: yarn add @nogn/gridsome-source-craft

NPM: npm install @nogn/gridsome-source-craft

Options

  • url - String required
    The URL provided in the nogn plugin site managment page: /admin/nogn.

  • livePreview - Boolean | String
    Default: false
    Enable/disable live preview and query being added on frontend (use an environment variable to have this disable this on production). Setting this to dangerouslyAllowAuthorizationHeaders will make Authorization headers available to the build. This may likley be a large security concern so only do this if you know what you are doing.

  • headers - Object
    An object of headers to be passed along with your request to the API endpoint. This will generally be used to authenticate your request.

  • fieldName - String
    Default: 'craft'
    The URL of a GraphQL API endpoint to request your schema from.

  • typeName - String
    Default: 'craft'
    The prefix to be used for your imported schema's field types.

Craft CMS setup

  1. Setup the GraphQL API on Craft

  2. Install nogn

  3. Setup a site