gatsby-config.js 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. const IS_STATIC = process.env.GATSBY_IS_STATIC
  2. const OPTS = {
  3. siteMetadata: {
  4. title: 'npm cli documentation',
  5. description: 'Documentation for the npm cli.',
  6. author: '@gatsbyjs'
  7. },
  8. plugins: [
  9. 'gatsby-plugin-root-import',
  10. 'gatsby-plugin-react-helmet',
  11. 'gatsby-plugin-catch-links',
  12. 'gatsby-plugin-styled-components',
  13. {
  14. resolve: 'gatsby-source-filesystem',
  15. options: {
  16. name: 'src',
  17. path: `${__dirname}/content/`
  18. }
  19. },
  20. {
  21. resolve: 'gatsby-plugin-no-sourcemaps'
  22. },
  23. 'gatsby-plugin-sharp',
  24. {
  25. resolve: 'gatsby-plugin-manifest',
  26. options: {
  27. name: 'gatsby-starter-default',
  28. short_name: 'starter',
  29. start_url: '/',
  30. background_color: '#663399',
  31. theme_color: '#663399',
  32. display: 'minimal-ui',
  33. icon: 'src/images/npm-icon.png' // This path is relative to the root of the site.
  34. }
  35. },
  36. {
  37. resolve: 'gatsby-plugin-google-fonts',
  38. options: {
  39. fonts: [
  40. 'Poppins',
  41. 'Inconsolata'
  42. ]
  43. }
  44. },
  45. {
  46. resolve: 'gatsby-transformer-remark',
  47. options: {
  48. // CommonMark mode (default: true)
  49. commonmark: true,
  50. // Footnotes mode (default: true)
  51. footnotes: true,
  52. // Pedantic mode (default: true)
  53. pedantic: true,
  54. // GitHub Flavored Markdown mode (default: true)
  55. gfm: true,
  56. // Plugins configs
  57. plugins: [{
  58. resolve: 'gatsby-remark-autolink-headers',
  59. options: {
  60. offsetY: '100',
  61. 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>',
  62. className: 'header-link-class',
  63. maintainCase: false,
  64. removeAccents: true
  65. }
  66. },
  67. {
  68. resolve: 'gatsby-remark-prismjs',
  69. options: {
  70. classPrefix: 'language-',
  71. inlineCodeMarker: null,
  72. aliases: {},
  73. showLineNumbers: false,
  74. noInlineHighlight: false
  75. }
  76. }]
  77. }
  78. }
  79. ]
  80. }
  81. const STATIC_OPTS = Object.assign({}, OPTS, {
  82. pathPrefix: '__GATSBY_IPFS_PATH_PREFIX__',
  83. plugins: OPTS.plugins.concat(['gatsby-plugin-ipfs'])
  84. })
  85. module.exports = IS_STATIC ? STATIC_OPTS : OPTS