update post template

This commit is contained in:
John Bowdre 2024-03-03 19:23:27 -06:00
parent 51fe66d3fe
commit 2248113ae2
2 changed files with 18 additions and 5 deletions

View file

@ -14,7 +14,7 @@
{% endif -%} {% endif -%}
{% for entry in feed.entries -%} {% 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 -%} {%- if entry.categories -%}
{% for category in entry.categories %}#{{ category }}{% if not loop.last%} {% endif %}{% endfor %} {% for category in entry.categories %}#{{ category }}{% if not loop.last%} {% endif %}{% endfor %}

View file

@ -1,8 +1,21 @@
{# {#
This is an example of a Tera template for each individual post. 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.
#}# {{ entry.title }} #}# {{ 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 }} {{ entry.body }}
─────
=> {{ feed.index_url }} Posts
=> {{ feed.capsule_url }} Home
{% if feed.rights -%}
{{ feed.rights }}
{%- endif %}