UNPKG

2.91 kBJavaScriptView Raw
1const IS_STATIC = process.env.GATSBY_IS_STATIC
2
3const 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-prefetch-google-fonts',
39 options: {
40 fonts: [
41 {
42 family: 'Poppins',
43 subsets: ['latin'],
44 variants: ['300', '400', '500']
45 },
46 {
47 family: 'Inconsolata',
48 subsets: ['latin'],
49 variants: ['400', '700']
50 }
51 ]
52 }
53 },
54 {
55 resolve: 'gatsby-transformer-remark',
56 options: {
57 // CommonMark mode (default: true)
58 commonmark: true,
59 // Footnotes mode (default: true)
60 footnotes: true,
61 // Pedantic mode (default: true)
62 pedantic: true,
63 // GitHub Flavored Markdown mode (default: true)
64 gfm: true,
65 // Plugins configs
66 plugins: [{
67 resolve: 'gatsby-remark-autolink-headers',
68 options: {
69 offsetY: '100',
70 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>',
71 className: 'header-link-class',
72 maintainCase: false,
73 removeAccents: true
74 }
75 },
76 {
77 resolve: 'gatsby-remark-prismjs',
78 options: {
79 classPrefix: 'language-',
80 inlineCodeMarker: null,
81 aliases: {},
82 showLineNumbers: false,
83 noInlineHighlight: false
84 }
85 }]
86 }
87 }
88 ]
89}
90
91const STATIC_OPTS = Object.assign({}, OPTS, {
92 pathPrefix: '__GATSBY_IPFS_PATH_PREFIX__',
93 plugins: OPTS.plugins.concat(['gatsby-plugin-ipfs'])
94})
95
96module.exports = IS_STATIC ? STATIC_OPTS : OPTS