gatsby-source-backquote

0.1.3 • Public • Published

Description

This plugin makes your Published Backquote Blog Posts available to be used in Gatsby.js to build your custom blog frontend.

How to install

npm install --save gatsby-source-backquote

Configuration

The plugin needs to know your Backquote Blog ID and Blog Access Token. You can get both from Backquote User Console. Add following to the plugins array inside gatsby-config.js file.

{
  resolve: "gatsby-source-backquote",
  options: {
    blogId: process.env.BACKQUOTE_BLOG_ID,
    token: process.env.BACKQUOTE_BLOG_TOKEN,
  },
},

This example gets blogId and token variables from environment variables BACKQUOTE_BLOG_ID and BACKQUOTE_BLOG_TOKEN. Be careful to not share the token with public.

How to query for data

Try this example GraphQL query to get the imported posts:

{
  allBackquotePost(sort: { fields: time_created, order: DESC }) {
    edges {
      node {
        id
        slug
        title
      }
    }
  }
}

Package Sidebar

Install

npm i gatsby-source-backquote

Weekly Downloads

0

Version

0.1.3

License

MIT

Unpacked Size

3.71 kB

Total Files

4

Last publish

Collaborators

  • jtogrul