From 2248113ae2b9a52e57c64fe8dc7505f745510927 Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Sun, 3 Mar 2024 19:23:27 -0600 Subject: [PATCH] update post template --- templates/index.tera | 2 +- templates/post.tera | 21 +++++++++++++++++---- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/templates/index.tera b/templates/index.tera index 609e100..ccf99d9 100644 --- a/templates/index.tera +++ b/templates/index.tera @@ -14,7 +14,7 @@ {% endif -%} {% for entry in feed.entries -%} -=> {{ entry.url }} {{ entry.updated | date(format="%Y-%m-%d") }} - {{ entry.title }} +=> {{ entry.url }} {{ entry.updated | date(format="%Y-%m-%d") }} {{ entry.title }} {%- if entry.categories -%} {% for category in entry.categories %}#{{ category }}{% if not loop.last%} {% endif %}{% endfor %} diff --git a/templates/post.tera b/templates/post.tera index d6f51bb..4ab5733 100644 --- a/templates/post.tera +++ b/templates/post.tera @@ -1,8 +1,21 @@ {# - This is an example of a Tera template for each individual post. - - This is a minimal example that just adds a header with the title from the - sidecar YAML metadata file. + Tera template for each individual post. #}# {{ entry.title }} +{% if entry.published != entry.updated -%} +* {{ entry.published | date(format="%Y-%m-%d") }} ~ {{ entry.updated | date(format="%Y-%m-%d") }} +{% else -%} +* {{ entry.updated | date(format="%Y-%m-%d") }} +{% endif -%} +{% if entry.categories -%} +* Categories: {{ entry.categories | join(sep=", ") }} +{% endif %} {{ entry.body }} +───── + +=> {{ feed.index_url }} Posts +=> {{ feed.capsule_url }} Home + +{% if feed.rights -%} +{{ feed.rights }} +{%- endif %} \ No newline at end of file