aboutsummaryrefslogtreecommitdiff
path: root/md/md2html.sh
diff options
context:
space:
mode:
Diffstat (limited to 'md/md2html.sh')
-rwxr-xr-xmd/md2html.sh17
1 files changed, 0 insertions, 17 deletions
diff --git a/md/md2html.sh b/md/md2html.sh
deleted file mode 100755
index d45f38d..0000000
--- a/md/md2html.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/bash
-# converts md to .tmpl.html with pandoc
-
-readonly POSTS_DIR="../../html/posts"
-readonly POST_TEMP="POST_TEMPLATE.tmpl.html"
-
-post=$(basename "$1" .md)
-echo "converting $post to HTML"
-
-# pandoc for md to html
-pandoc -f markdown-auto_identifiers -t html --template=$POST_TEMP --wrap=none -o "$POSTS_DIR/$post.tmpl.html" "$post".md
-
-# # adds in filename to path no longer needed
-# sed -i "s/posts\//posts\/$post/" "$POSTS_DIR/$post.tmpl.html"
-
-# makes http & https links have target _blank and rel noopener noreferrer
-perl -i -0pe 's/(<\W*a\W*[^>]*href=)(["'"'"']http[s]?:\/\/[^"'"'"'>]*["'"'"'])([^>]*>)/$1$2 target="_blank" rel="noopener noreferrer"$3/g' "$POSTS_DIR/$post.tmpl.html" \ No newline at end of file