Het compile script opnieuw gemaakt.
This commit is contained in:
parent
ee158bae71
commit
0be017e706
14
compile.js
14
compile.js
|
@ -3,10 +3,18 @@ var fs = require('fs');
|
|||
var marked = require('marked');
|
||||
var buffer = '<a href="http://hoewerkt.werkmanrooster.nl">Een betere leeservaring is op http://hoewerkt.werkmanrooster.nl, het is ook bedoelt om het hier te lezen. Ook staat dit papier NIET op de bedoelde volgorde.</a>';
|
||||
|
||||
var articles = fs.readdirSync(__dirname + '/markdown');
|
||||
var folders = fs.readdirSync(__dirname + '/articles');
|
||||
|
||||
for (article of articles) {
|
||||
buffer += marked(fs.readFileSync(__dirname + '/markdown/' + article).toString());
|
||||
for (var folder of folders) {
|
||||
if (folder != 'index.md') {
|
||||
var articles = fs.readdirSync(__dirname + '/articles/' + folder);
|
||||
for (var article of articles) {
|
||||
buffer += marked(fs.readFileSync(__dirname + '/articles/' + folder + '/' + article).toString());
|
||||
}
|
||||
}
|
||||
else {
|
||||
buffer += marked(fs.readFileSync(__dirname + '/articles/' + folder).toString());
|
||||
}
|
||||
}
|
||||
|
||||
fs.writeFileSync(__dirname + '/pws.html', buffer);
|
||||
|
|
Loading…
Reference in a new issue