summaryrefslogtreecommitdiff
path: root/src/shblg
diff options
context:
space:
mode:
Diffstat (limited to 'src/shblg')
-rw-r--r--src/shblg23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/shblg b/src/shblg
index 5361975..ff10250 100644
--- a/src/shblg
+++ b/src/shblg
@@ -1,4 +1,23 @@
#!/bin/sh
-BLOG_DIR
-OUTPUT_DIR
+INPUT_DIR=blog
+OUTPUT_DIR=dist
+PAGE_TEMPLATE=blog/template.html
+
+while getopts ":o:i:t:" opt; do
+ case "$opt" in
+ o)
+ OUTPUT_DIR=$(realpath $OPTARG)
+ ;;
+ i)
+ INPUT_DIR=$(realpath $OPTARG)
+ ;;
+ t)
+ PAGE_TEMPLATE=$(realpath $OPTARG)
+ ;;
+ esac
+done
+
+for f in ${INPUT_DIR}/*.md; do
+ md2html "$f" > ${OUTPUT_DIR}/$f
+done