From f0e9a91b55b6f90d9ddbe7347293be27bf58a5ed Mon Sep 17 00:00:00 2001 From: Menix Date: Thu, 21 Jul 2022 18:54:02 +0000 Subject: Added microblog and classless themes --- public_md/build.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'public_md/build.js') diff --git a/public_md/build.js b/public_md/build.js index 2dddfc0..abc0320 100644 --- a/public_md/build.js +++ b/public_md/build.js @@ -3,6 +3,17 @@ const fs = require("fs"); const path = require("path"); md = new MarkdownIt(); +const html_header = ` + + + + + + ` +const html_footer = ` + + ` + const walkSync = (inputdir, outputdir, callback) => { const files = fs.readdirSync(inputdir); @@ -26,7 +37,7 @@ function fileHandler (filepath, outputdir, stats) { }); outputpath = outputpath.replace(/\.md$/i, '.html'); - const html = md.render(buf.toString()); + const html = html_header + md.render(buf.toString()) + html_footer; fs.writeFile(outputpath, html, (err) => { if (err) console.log(err); console.log("Successfully Written to: " + outputpath); -- cgit 1.4.1-2-gfad0