2020-03-06 18:59:36 +08:00
|
|
|
const path = require('path')
|
|
|
|
|
|
|
|
function addStyleResource(rule) {
|
|
|
|
rule.use('style-resource')
|
|
|
|
.loader('style-resources-loader')
|
|
|
|
.options({
|
|
|
|
patterns: [
|
|
|
|
path.resolve(__dirname, './src/variables.scss'),
|
|
|
|
],
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2019-12-08 04:02:22 +08:00
|
|
|
module.exports = {
|
2020-08-19 17:22:54 +08:00
|
|
|
siteName: 'tiptap 2',
|
2020-04-21 03:01:38 +08:00
|
|
|
titleTemplate: '%s',
|
2019-12-08 04:02:22 +08:00
|
|
|
port: 3000,
|
|
|
|
plugins: [
|
|
|
|
{
|
|
|
|
use: '@gridsome/vue-remark',
|
|
|
|
options: {
|
2020-04-18 23:05:29 +08:00
|
|
|
typeName: 'DocPage',
|
2020-04-24 16:03:15 +08:00
|
|
|
baseDir: './src/docPages',
|
2020-04-18 23:54:00 +08:00
|
|
|
template: './src/templates/DocPage',
|
2020-08-28 19:24:34 +08:00
|
|
|
index: './introduction',
|
2019-12-08 04:02:22 +08:00
|
|
|
plugins: [
|
|
|
|
'@gridsome/remark-prismjs',
|
2020-08-19 02:42:54 +08:00
|
|
|
'remark-container',
|
2020-09-27 16:29:01 +08:00
|
|
|
'remark-toc',
|
2019-12-08 04:02:22 +08:00
|
|
|
],
|
2020-04-19 05:00:47 +08:00
|
|
|
remark: {
|
|
|
|
autolinkHeadings: {
|
|
|
|
content: {
|
|
|
|
type: 'text',
|
2020-09-24 05:38:11 +08:00
|
|
|
value: '#',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2020-04-17 18:55:53 +08:00
|
|
|
},
|
2019-12-08 04:02:22 +08:00
|
|
|
},
|
2020-08-27 19:43:45 +08:00
|
|
|
{
|
|
|
|
use: 'gridsome-plugin-simple-analytics',
|
|
|
|
options: {
|
|
|
|
domain: 'data.tiptap.dev',
|
|
|
|
},
|
|
|
|
},
|
2020-03-06 18:59:36 +08:00
|
|
|
],
|
|
|
|
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))
|
|
|
|
})
|
|
|
|
},
|
2019-12-08 04:02:22 +08:00
|
|
|
}
|