18 lines
358 B
Bash
Executable File
18 lines
358 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
PUB_DIR=${1:-/home/html/planet/static}
|
|
FILES=md/*.md
|
|
|
|
for f in $FILES
|
|
do
|
|
filename=$(basename -- $f .md)
|
|
echo "publishing md/$filename.md to $PUB_DIR/$filename.html"
|
|
mkd2html -css style.css $f
|
|
mv md/*.html $PUB_DIR
|
|
|
|
# TODO insert nav before <body> tag
|
|
# sed '/<body>/e cat nav.html' html/$filename.html
|
|
done
|
|
|
|
|