|
|
@ -206,12 +206,14 @@ router.post('/init', function (req, res) {
|
|
|
|
'---\n' +
|
|
|
|
'---\n' +
|
|
|
|
index.content;
|
|
|
|
index.content;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fs.ensureDir('content/pages/').then(() => {
|
|
|
|
fs.writeFile('content/pages/index.md', init)
|
|
|
|
fs.writeFile('content/pages/index.md', init)
|
|
|
|
.then(() => {
|
|
|
|
.then(() => {
|
|
|
|
console.log('index file created');
|
|
|
|
//console.log('index file created');
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.catch(err => {
|
|
|
|
.catch(() => {
|
|
|
|
console.log('ERROR', err);
|
|
|
|
//console.log('ERROR', err);
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|