forked from andresgalante/patternfly-next
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gatsby-config.js
103 lines (102 loc) · 2.75 KB
/
gatsby-config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
const path = require('path');
const codeTitleTransformer = require('gatsby-theme-patternfly-org/helpers/codeTitleTransformer');
module.exports = {
siteMetadata: {
title: 'PatternFly 4 - HTML',
siteUrl: 'https://pf4.patternfly.org/'
},
plugins: [
// Use our patternfly.org theme
{
resolve: `gatsby-theme-patternfly-org`,
options: {
context: 'core', // For global items that need sideNav
showFooter: false,
sideNav: {
core: [
{ section: 'overview' },
{ section: 'components' },
{ section: 'layouts' },
{ section: 'utilities' },
{ section: 'demos' }
]
},
topNavItems: [
{
text: 'Accessibility',
path: '/accessibility-guide'
},
{
text: 'Contribute',
path: '/contribution'
},
{
text: 'Guidelines',
path: '/guidelines'
},
{
text: 'Modifiers',
path: '/modifiers'
},
{
text: 'Upgrade guide',
path: '/upgrade-guide'
},
{
text: 'Icons',
path: '/icons'
}
]
}
},
// Source shared pages from the theme
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'shared', // This goes in URLs
// TODO: prettier way to do this
path: require.resolve('gatsby-theme-patternfly-org').replace('index.js', 'pages')
}
},
// Source component documentation
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'core', // This goes in URLs and determines sideNav items
path: `${path.resolve(__dirname)}/src/patternfly`,
ignore: ['**/*.scss']
}
},
// Source static pages
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'pages-core', // Don't add /documentation/core to url, but use Core sideNav items
path: `${path.resolve(__dirname)}/src/site/pages`
}
},
// Source release notes
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'core', // This goes in URLs and determines sideNav items
path: `${path.resolve(__dirname)}/RELEASE-NOTES.md`
}
},
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'core', // This goes in URLs and determines sideNav items
path: `${path.resolve(__dirname)}/UPGRADE-GUIDE.md`
}
},
// Pipe MDX files through this plugin that spits out React components
{
resolve: 'gatsby-plugin-mdx',
options: {
extensions: ['.md'],
rehypePlugins: [codeTitleTransformer]
}
}
]
};