diff options
author | Romain Gonçalves <me@rgoncalves.se> | 2021-08-08 10:02:01 +0200 |
---|---|---|
committer | Romain Gonçalves <me@rgoncalves.se> | 2021-08-08 10:02:01 +0200 |
commit | a677748e19cc2e490ffcdbd5799755e67ab4ff02 (patch) | |
tree | 2fcbea6eafab16425f6a56ac5bcf83c2d02573f3 /bin/ssg | |
parent | fc33ada43aba6d46e6e0dff315b3b753058fa839 (diff) | |
download | rgoncalves.se-a677748e19cc2e490ffcdbd5799755e67ab4ff02.tar.gz |
bin/ssg: Switch for showing date in index
Diffstat (limited to 'bin/ssg')
-rwxr-xr-x | bin/ssg | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -10,7 +10,7 @@ OUT="out" . ./bin/ssg-template _log() { - echo [${0}] $@ + echo [${0}] "$@" } _to_html() { @@ -46,6 +46,7 @@ _convert_urls() { main() { local file + local out_path # template files for template in header footer; do @@ -56,7 +57,9 @@ main() { # markdown files for file in $(find "${SRC}" -iname "*.md"); do - if [ "${file}" -ot $(_get_out_path "${file}") ]; then + out_path=$(_get_out_path "${file}") + + if [ "${file}" -ot "${out_path}" ]; then _log "! ${file}" continue fi @@ -89,7 +92,7 @@ main() { # Concatenate temporary files to final page m4 templates/default.html > "${TMP_FILE}" - install -D "${TMP_FILE}" $(_get_out_path "${file}") + install -D "${TMP_FILE}" "${out_path}" done # html files |