-
Notifications
You must be signed in to change notification settings - Fork 123
/
ydoc.js
37 lines (36 loc) · 917 Bytes
/
ydoc.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
const { exec } = require('child_process');
const path = require('path')
const root = __dirname;
module.exports = {
title: "ydoc",
description: "ydoc description demo",
author: "ymfe",
plugins: ["copy", "edit-page", {
name: 'privateCreateDemo',
module: {
finish: function(){
exec(`cd ${root}; sh bin/build-demo-page.sh`, (err, stdout, stderr) =>{
if(err){
console.error(err);
return;
}
if(stdout)console.log(`stdout: ${stdout}`);
if(stderr)console.log(`stderr: ${stderr}`);
})
}
}
}],
pluginsConfig: {
'import-asset': {
css: 'custom.css'
},
"edit-page": {
prefix: 'https://github.com/YMFE/ydoc/tree/master/docs'
}
},
markdownIt: function(md){
md.use(require('markdown-it-include'), __dirname);
},
dist: '_site',
// version: require('./package.json').version
}