summary refs log tree commit diff stats
path: root/public_md/build.js
diff options
context:
space:
mode:
Diffstat (limited to 'public_md/build.js')
-rw-r--r--public_md/build.js13
1 files changed, 12 insertions, 1 deletions
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 = ` 
+  <!doctype HTML>
+  <html><head>
+  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@exampledev/new.css@1/new.min.css">
+  <link rel="stylesheet" href="https://fonts.xz.style/serve/inter.css">
+  </head><body>
+  `
+const html_footer = `
+  </body></html>
+  `
+
 
 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);