diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a9a5aec --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +tmp diff --git a/foot.html b/foot.html new file mode 100644 index 0000000..921ba2a --- /dev/null +++ b/foot.html @@ -0,0 +1,2 @@ + diff --git a/head.html b/head.html new file mode 100644 index 0000000..d8de143 --- /dev/null +++ b/head.html @@ -0,0 +1,5 @@ + + +
+ + diff --git a/nav.html b/nav.html index 4908df8..f656851 100644 --- a/nav.html +++ b/nav.html @@ -1,6 +1,6 @@ - + diff --git a/publish.sh b/publish.sh index 870255c..6b87434 100755 --- a/publish.sh +++ b/publish.sh @@ -3,15 +3,21 @@ PUB_DIR=${1:-/home/html/planet/static} FILES=md/*.md +test -d tmp || mkdir tmp + 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 tag - # sed '//e cat nav.html' html/$filename.html + markdown -o tmp/$filename.html $f + sed -i 's/^/ /' tmp/$filename.html + cp head.html tmp/ + # set the title + title="$(echo $filename | awk '{for(i=1;i<=NF;i++){ $i=toupper(substr($i,1,1)) substr($i,2) }}1')" + echo "