Add Timestamp metadata
This commit is contained in:
@@ -99,6 +99,8 @@ xaymar:
|
|||||||
enabled: true
|
enabled: true
|
||||||
tags:
|
tags:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
timestamp:
|
||||||
|
enabled: true
|
||||||
comments:
|
comments:
|
||||||
enabled: true
|
enabled: true
|
||||||
provider: "disqus"
|
provider: "disqus"
|
||||||
|
|||||||
@@ -23,18 +23,26 @@
|
|||||||
{% if site.xaymar.meta.permalink.enabled and include.permalink != nil %}
|
{% if site.xaymar.meta.permalink.enabled and include.permalink != nil %}
|
||||||
{% assign has_meta_permalink=true %}
|
{% assign has_meta_permalink=true %}
|
||||||
{% endif %}
|
{% 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 %}
|
{% if site.xaymar.meta.tags.enabled and include.tags != nil %}
|
||||||
{% assign has_meta_tags=true %}
|
{% assign has_meta_tags=true %}
|
||||||
{% endif %}
|
{% 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">
|
<div class="meta">
|
||||||
{% if has_meta_permalink %}
|
{% if has_meta_permalink %}
|
||||||
<a class="permalink" href="{{ include.permalink | absolute_url }}">
|
<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
|
Permalink
|
||||||
{% if include.date %}</time>{% endif %}
|
{% if include.timestamp %}</time>{% endif %}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% 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 %}
|
{% if has_meta_tags %}
|
||||||
<div class="tags">
|
<div class="tags">
|
||||||
<span>Tags:</span>
|
<span>Tags:</span>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
{% assign content=data.content %}
|
{% assign content=data.content %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% include article.liquid type=post index=true title=data.title content=content permalink=data.url categories=data.categories tags=data.tags %}
|
{% include article.liquid type=post index=true title=data.title content=content permalink=data.url categories=data.categories tags=data.tags timestamp=data.date %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% if paginator.total_pages > 1 %}
|
{% if paginator.total_pages > 1 %}
|
||||||
|
|||||||
@@ -88,6 +88,12 @@ article > .meta > .permalink {
|
|||||||
font-variant: small-caps;
|
font-variant: small-caps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
article > .meta > .timestamp {
|
||||||
|
float: right;
|
||||||
|
padding: 0.05em .5rem;
|
||||||
|
font-variant: all-small-caps;
|
||||||
|
}
|
||||||
|
|
||||||
article > .meta > .tags {
|
article > .meta > .tags {
|
||||||
display: inline;
|
display: inline;
|
||||||
padding: 0 .5rem;
|
padding: 0 .5rem;
|
||||||
@@ -99,6 +105,7 @@ article > .meta > .tags > span:first-child {
|
|||||||
}
|
}
|
||||||
|
|
||||||
article > .meta > .tags > .tag {
|
article > .meta > .tags > .tag {
|
||||||
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
article > .meta > .tags > .tag:not(:last-child):after {
|
article > .meta > .tags > .tag:not(:last-child):after {
|
||||||
|
|||||||
Reference in New Issue
Block a user