1.0.11 • Published 2 years ago
gatsby-source-keepitsimple v1.0.11
Gatsby Source Keep It Simple Plugin
Gatsby source plugin for building websites using Keep It Simple as a data source.
Installation
Install plugin with:
  yarn add gatsby-source-keepitsimpleor
  npm i gatsby-source-keepitsimplePlugin Reference
Plugin options
| Options | Type | Description | 
|---|---|---|
| prefix | string | Required. Your Keep It Simple project prefix. | 
Example
module.exports = {
  plugins: [
    // other gatsby plugins
    // ...
    {
      resolve: "gatsby-source-keepitsimple",
      options: {
        prefix: "your-project-prefix",
      },
    },
  ],
};Peer Dependencies
Usage/Examples
How to query keep it simple cms project Pages data:
import { useStaticQuery, graphql } from "gatsby";
export const useKisLandingPageData = () => {
  const { data } = useStaticQuery(graphql`
    query MyQuery {
      data: kisLandingPagePage {
        header {
          headline {
            html
          }
          image {
            alt
            image {
              childImageSharp {
                gatsbyImageData
              }
            }
          }
        }
        ...
      }
    }
  `);
  return data;
};How to query keep it simple cms project Data Type data:
import { useStaticQuery, graphql } from "gatsby";
export const useKisBlogPostArticlesData = () => {
  const { data } = useStaticQuery(graphql`
    query {
      data: allKisBlogArticles {
        nodes {
          author
          brief_description
          caption
          cover_image {
            alt
            image {
              childImageSharp {
                gatsbyImageData
              }
            }
          }
          date
          full_description {
            html
          }
          headline
          slug
        }
      }
    }
  `);
  return data.nodes;
};Publishing to npm
- Run - yarn changesetand include the packages that you want to include in this new changeset.
- Run - yarn changeset versionto bump the packages version numbers & update each corresponding CHANGELOGS.
- You can now commit your changes. 
- Run - yarn changeset publishto publish the changed packages to npm.
- Debug any issues that occur during publising 
Author
The Puzzlers - hi@pthepuzzlers.io