Skip to content

Gatsby source plugin for building websites using prismic.io as a data source

Notifications You must be signed in to change notification settings

builtbyfield/gatsby-source-prismic

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gatsby-source-prismic-field

Source plugin for pulling documents into Gatsby from prismic.io repositories. Forked from gatsby-source-prismic to permit json extraction and some other custom features.

Install

npm install --save gatsby-source-prismic-field

How to use

// In your gatsby-config.js
plugins: [
  {
    resolve: `gatsby-source-prismic-field`,
    options: {
      repositoryName: `your_repository_name`,
      accessToken: `your_acces_token`
    }
  }
];

How to query

You can query Document nodes created from prismic.io like the following:

{
  allPrismicDocument {
    edges {
      node {
        id
        data {
          title {
            type
            text
          }
        }
      }
    }
  }
}

About

Gatsby source plugin for building websites using prismic.io as a data source

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%