summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMenix <menix@tilde.institute>2022-07-21 18:54:02 +0000
committerMenix <menix@tilde.institute>2022-07-21 18:54:02 +0000
commitf0e9a91b55b6f90d9ddbe7347293be27bf58a5ed (patch)
tree0edc124b1ccd7e5f5ceb1037b1aa4c53e38f8fae
parent32c74c9d9984c6da8644c50c2945eb5d4c3bea24 (diff)
downloadtilde-notes-f0e9a91b55b6f90d9ddbe7347293be27bf58a5ed.tar.gz
Added microblog and classless themes HEAD master
-rw-r--r--public_md/build.js13
-rwxr-xr-xpublic_md/mb.sh6
-rw-r--r--public_md/src/index.md2
-rw-r--r--public_md/src/microblog.md5
4 files changed, 25 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);
diff --git a/public_md/mb.sh b/public_md/mb.sh
new file mode 100755
index 0000000..c97935a
--- /dev/null
+++ b/public_md/mb.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+echo -e "*" `date` '\t'  "$@" >>~/tilde-notes/public_md/src/microblog.md  
+cd ~/tilde-notes/public_md/ && node build.js 
+
+
diff --git a/public_md/src/index.md b/public_md/src/index.md
index 168c907..a06cf46 100644
--- a/public_md/src/index.md
+++ b/public_md/src/index.md
@@ -6,3 +6,5 @@
 
 I think I might want to add some sort of simple microblog to this, perhaps similar to [twtxt](https://twtxt.readthedocs.io/en/latest/). Maybe watch for file changes as well. 
 
+[log](microblog.html)
+
diff --git a/public_md/src/microblog.md b/public_md/src/microblog.md
new file mode 100644
index 0000000..63281ce
--- /dev/null
+++ b/public_md/src/microblog.md
@@ -0,0 +1,5 @@
+# Log
+  
+  
+* Thu Jul 21 18:22:31 UTC 2022 	 First attempt at a very simple micro web log
+* Thu Jul 21 18:49:25 UTC 2022 	 Added a [classless](https://github.com/dbohdan/classless-css) theme