-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgridsome.config.js
39 lines (36 loc) · 1007 Bytes
/
gridsome.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
const path = require('path')
function addStyleResource (rule) {
rule.use('style-resource')
.loader('style-resources-loader')
.options({
patterns: [
path.resolve(__dirname, './src/assets/sass/styles.sass'),
],
})
}
module.exports = {
siteName: 'Guntenberg Freaks',
siteDescription: 'Playground for Gutenberg Freaks',
templates: {
WordPressCategory: '/category/:slug', // adds route for "category" post type (Optional)
WordPressPost: '/:year/:month/:day/:id', //adds route for "post" post type (Optional)
WordPressPostTag: '/tag/:slug', // adds route for "post_tag" post type (Optional)
WordPressPage: [
{
path: (node) => {
const url = new URL(node.link);
return `${url.pathname}`
}
}
]
},
plugins: [
{
use: '@gridsome/source-wordpress',
options: {
baseUrl: process.env.CONTAINER_URL,
typeName: 'WordPress', // GraphQL schema name (Optional)
}
}
]
}