blob: ff10250f932e405fda5f6ad3d67f82328d22d2fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/bin/sh
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
|