aboutsummaryrefslogtreecommitdiffstats
path: root/bin/ssg-template
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2021-08-07 21:26:15 +0200
committerRomain Gonçalves <me@rgoncalves.se>2021-08-07 21:26:15 +0200
commitbc288cdc12e9bfdf9ed2fe0954b7b25ce2ede009 (patch)
tree1a72e1252a86a5f9f4835d9b1692b4b881192f83 /bin/ssg-template
parent6ca04ed7d406781bb47dc826bea12f970cd4ebb8 (diff)
downloadrgoncalves.se-bc288cdc12e9bfdf9ed2fe0954b7b25ce2ede009.tar.gz
Display options for date in index
Diffstat (limited to 'bin/ssg-template')
-rw-r--r--bin/ssg-template12
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/ssg-template b/bin/ssg-template
index d246028..e0689cb 100644
--- a/bin/ssg-template
+++ b/bin/ssg-template
@@ -138,12 +138,12 @@ _render_index() {
title=$(_get_value "${file}" "title" "$(_get_title ${file})")
- cat <<-EOF
- <li>
- <a href="${path}">${title}</a>
- <span>$(_get_date_human "${file}")</span>
- </li>
- EOF
+ echo "<li>"
+ if [ $(_get_value "${file}" "index_show_date") ]; then
+ echo "<span>$(_get_date_human \"${file}\")</span>"
+ fi
+ echo "<a href=\"${path}\">${title}</a>"
+ echo "</li>"
done
echo "</ul>"
}
remember that computers suck.