Skip to content

Instantly share code, notes, and snippets.

@xbojch
Created September 24, 2020 16:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xbojch/08cd63045666754ae27dced740bce722 to your computer and use it in GitHub Desktop.
Save xbojch/08cd63045666754ae27dced740bce722 to your computer and use it in GitHub Desktop.
Full Gatsby config
module.exports = {
siteMetadata: {
title: `Improve bad code`,
titleTemplate: ``,
url: `https://www.improvebadcode.com/`,
twitterUsername: ``,
image: `content/assets/profile-pic.jpg`,
author: `Bojan Bedrač`,
description: `Personal blog about improving software development skills and becoming a better developer.`,
siteUrl: `https://www.improvebadcode.com/`,
social: {
twitter: `xbojch`,
},
},
plugins: [
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/content/blog`,
name: `blog`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/content/assets`,
name: `assets`,
},
},
{
resolve: `gatsby-transformer-remark`,
options: {
plugins: [
{
resolve: `gatsby-remark-images`,
options: {
maxWidth: 590,
},
},
{
resolve: `gatsby-remark-responsive-iframe`,
options: {
wrapperStyle: `margin-bottom: 1.0725rem`,
},
},
`gatsby-remark-prismjs`,
`gatsby-remark-copy-linked-files`,
`gatsby-remark-smartypants`,
],
},
},
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
{
resolve: `gatsby-plugin-gdpr-cookies`,
options: {
googleAnalytics: {
trackingId: 'UA-1234567890-1',
// Setting this parameter is optional
anonymize: true
},
// facebookPixel: {
// pixelId: 'YOUR_FACEBOOK_PIXEL_ID'
// },
// Defines the environments where the tracking should be available - default is ["production"]
environments: ['production']
},
},
`gatsby-plugin-feed`,
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `Gatsby Starter Blog`,
short_name: `GatsbyJS`,
start_url: `/`,
background_color: `#ffffff`,
theme_color: `#663399`,
display: `minimal-ui`,
icon: `content/assets/favicon.png`,
},
},
`gatsby-plugin-react-helmet`,
{
resolve: `gatsby-plugin-typography`,
options: {
pathToConfigModule: `src/utils/typography`,
},
},
{
resolve: 'gatsby-plugin-htaccess',
options: {
https: false,
custom: `
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
`,
www: true,
},
},
// this (optional) plugin enables Progressive Web App + Offline functionality
// To learn more, visit: https://gatsby.dev/offline
// `gatsby-plugin-offline`,
],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment