Skip to content

Instantly share code, notes, and snippets.

@domtaylor
Created January 30, 2020 10:48
Show Gist options
  • Save domtaylor/5cde6d47d2010927c91f51aa0d0262d3 to your computer and use it in GitHub Desktop.
Save domtaylor/5cde6d47d2010927c91f51aa0d0262d3 to your computer and use it in GitHub Desktop.
gatsby-config.js
require(`dotenv`).config();
module.exports = {
siteMetadata: {
title: `GraphCMS SWAG Store`,
description: `Super cool SWAG from your favourite GraphQL CMS!`,
siteUrl: `https://store.graphcms.com`,
},
plugins: [
`gatsby-plugin-postcss`,
{
resolve: 'gatsby-plugin-purgecss',
options: {
tailwind: true,
purgeOnly: ['src/main.css'],
},
},
{
resolve: 'gatsby-plugin-react-svg',
options: {
rule: {
include: /svg/,
},
},
},
`gatsby-plugin-sharp`,
{
resolve: `gatsby-source-graphql`,
options: {
typeName: `GraphCMS`,
fieldName: `cms`,
url: process.env.GRAPHCMS_ENDPOINT,
headers: {
Authorization: `Bearer ${process.env.GRAPHCMS_QUERY_TOKEN}`,
},
},
},
{
resolve: `gatsby-source-printful`,
options: {
apiKey: process.env.PRINTFUL_API_KEY,
},
},
`gatsby-transformer-sharp`,
`gatsby-plugin-react-helmet`,
],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment