1 const IS_STATIC = process.env.GATSBY_IS_STATIC 2 3 const OPTS = { 4 siteMetadata: { 5 title: 'npm cli documentation', 6 description: 'Documentation for the npm cli.', 7 author: '@gatsbyjs' 8 }, 9 plugins: [ 10 'gatsby-plugin-root-import', 11 'gatsby-plugin-react-helmet', 12 'gatsby-plugin-catch-links', 13 'gatsby-plugin-styled-components', 14 { 15 resolve: 'gatsby-source-filesystem', 16 options: { 17 name: 'src', 18 path: `${__dirname}/content/` 19 } 20 }, 21 { 22 resolve: 'gatsby-plugin-no-sourcemaps' 23 }, 24 'gatsby-plugin-sharp', 25 { 26 resolve: 'gatsby-plugin-manifest', 27 options: { 28 name: 'gatsby-starter-default', 29 short_name: 'starter', 30 start_url: '/', 31 background_color: '#663399', 32 theme_color: '#663399', 33 display: 'minimal-ui', 34 icon: 'src/images/npm-icon.png' // This path is relative to the root of the site. 35 } 36 }, 37 { 38 resolve: 'gatsby-plugin-google-fonts', 39 options: { 40 fonts: [ 41 'Poppins', 42 'Inconsolata' 43 ] 44 } 45 }, 46 { 47 resolve: 'gatsby-transformer-remark', 48 options: { 49 // CommonMark mode (default: true) 50 commonmark: true, 51 // Footnotes mode (default: true) 52 footnotes: true, 53 // Pedantic mode (default: true) 54 pedantic: true, 55 // GitHub Flavored Markdown mode (default: true) 56 gfm: true, 57 // Plugins configs 58 plugins: [{ 59 resolve: 'gatsby-remark-autolink-headers', 60 options: { 61 offsetY: '100', 62 icon: '<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>', 63 className: 'header-link-class', 64 maintainCase: false, 65 removeAccents: true 66 } 67 }, 68 { 69 resolve: 'gatsby-remark-prismjs', 70 options: { 71 classPrefix: 'language-', 72 inlineCodeMarker: null, 73 aliases: {}, 74 showLineNumbers: false, 75 noInlineHighlight: false 76 } 77 }] 78 } 79 } 80 ] 81 } 82 83 const STATIC_OPTS = Object.assign({}, OPTS, { 84 pathPrefix: '__GATSBY_IPFS_PATH_PREFIX__', 85 plugins: OPTS.plugins.concat(['gatsby-plugin-ipfs']) 86 }) 87 88 module.exports = IS_STATIC ? STATIC_OPTS : OPTS 89