-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgridsome.config.js
43 lines (40 loc) · 1.4 KB
/
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
40
41
42
43
const path = require('path')
function addStyleResource (rule) {
rule.use('style-resource')
.loader('style-resources-loader')
.options({
patterns: [
path.resolve(__dirname, './src/assets/style/*.scss'),
],
})
}
module.exports = {
siteName: 'Gridsome',
siteDescription: 'A WordPress starter for Gridsome',
plugins: [
{
use: '~/src/plugins/wp-source/',
options: {
baseUrl: 'https://admin.ruthgeorgiev.com', // required - Replace me with your Wordpress URL
typeName: 'WordPress', // GraphQL schema name (Optional)
perPage: 100, // How many posts to load from server per request (Optional)
concurrent: 10, // How many requests to run simultaneously (Optional)
routes: {
post: '/:year/:month/:day/:slug', //adds route for "post" post type (Optional)
post_tag: '/tag/:slug' // adds route for "post_tag" post type (Optional)
},
createPages: {
approach: 'include', // include or exclude, default is include
list: [] //an array of page slugs to include or exclude, ex. ['about', 'our-team'], default is an empty array
}
}
}
],
chainWebpack (config) {
// Load variables for all vue-files
const types = ['vue-modules', 'vue', 'normal-modules', 'normal']
types.forEach(type => {
addStyleResource(config.module.rule('scss').oneOf(type))
})
}
}