Add Timestamp metadata

This commit is contained in:
Michael Fabian 'Xaymar' Dirks
2021-12-25 09:08:01 +01:00
parent 0a199545eb
commit d0e497e222
4 changed files with 21 additions and 4 deletions
+11 -3
View File
@@ -23,18 +23,26 @@
{% if site.xaymar.meta.permalink.enabled and include.permalink != nil %}
{% assign has_meta_permalink=true %}
{% endif %}
{% if site.xaymar.meta.timestamp.enabled and include.timestamp %}
{% assign has_meta_timestamp=true %}
{% endif %}
{% if site.xaymar.meta.tags.enabled and include.tags != nil %}
{% assign has_meta_tags=true %}
{% endif %}
{% if site.xaymar.meta.enabled and has_meta_permalink or has_meta_tags %}
{% if site.xaymar.meta.enabled and has_meta_permalink or has_meta_tags or has_meta_date %}
<div class="meta">
{% if has_meta_permalink %}
<a class="permalink" href="{{ include.permalink | absolute_url }}">
{% if include.date %}<time datetime="{{ include.date | date_to_xmlschema }}">{% endif %}
{% if include.timestamp %}<time datetime="{{ include.timestamp | date_to_xmlschema }}">{% endif %}
Permalink
{% if include.date %}</time>{% endif %}
{% if include.timestamp %}</time>{% endif %}
</a>
{% endif %}
{% if has_meta_timestamp %}
<time class="timestamp" datetime="{{ include.timestamp | date_to_xmlschema }}">
{{ include.timestamp | date_to_string }}
</time>
{% endif %}
{% if has_meta_tags %}
<div class="tags">
<span>Tags:</span>