13 lines
463 B
JavaScript
13 lines
463 B
JavaScript
|
//compile.js
|
||
|
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.</a>';
|
||
|
|
||
|
var articles = fs.readdirSync(__dirname + '/markdown');
|
||
|
|
||
|
for (article of articles) {
|
||
|
buffer += marked(fs.readFileSync(__dirname + '/markdown/' + article).toString());
|
||
|
}
|
||
|
|
||
|
fs.writeFileSync(__dirname + '/pws.html', buffer);
|