diff --git a/blog-refresh.sh b/blog-refresh.sh index c695371..32c49cb 100755 --- a/blog-refresh.sh +++ b/blog-refresh.sh @@ -61,7 +61,7 @@ create_entry() { path="$9" outpath="$(basename "$path" .md).html" # convert new markdown posts to html - pandoc -s --css=sakura-vader.css "$path" footer.md -t html5 -f markdown -o "$outpath" + pandoc -s --css=/static/css/sakura-vader.css "$path" src/footer/footer.md -t html5 -f markdown -o "$outpath" # then add it to the index title="$(grep -h '^title: ' "$path" | sed 's/title: //g')" created=$(grep -h '^date: ' "$path" | sed 's/date: //g') @@ -69,6 +69,12 @@ create_entry() { rss_entry "$title" "$outpath" } +convert_static() { + path="$9" + outpath="$(basename "$path" .md).html" + pandoc -s --css=/static/css/sakura-vader.css "$path" -t html5 -f markdown -o "$outpath" +} + has_updates() { git fetch &> /dev/null diff="$(git diff master origin/master)" @@ -84,6 +90,7 @@ rm -f index.html rm -f entry_list.md rm -f rss.xml add_header -ls -ltu src/*.md | tail -n+1 | while read f; do create_entry $f; done +ls -ltu src/posts/*.md | tail -n+1 | while read f; do create_entry $f; done +ls -ltu src/*.md | tail -n+1 | while read f; do convert_static $f; done add_footer -pandoc -s --css=sakura-vader.css index_header.md entry_list.md after-entry-list.md footer.md -o index.html +pandoc -s --css=/static/css/sakura-vader.css src/index/index_header.md entry_list.md src/index/after-entry-list.md src/footer/footer.md -o index.html