Add Timestamp metadata
This commit is contained in:
@@ -99,6 +99,8 @@ xaymar:
|
||||
enabled: true
|
||||
tags:
|
||||
enabled: true
|
||||
timestamp:
|
||||
enabled: true
|
||||
comments:
|
||||
enabled: true
|
||||
provider: "disqus"
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
{% else %}
|
||||
{% assign content=data.content %}
|
||||
{% 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 %}
|
||||
</div>
|
||||
{% if paginator.total_pages > 1 %}
|
||||
|
||||
@@ -88,6 +88,12 @@ article > .meta > .permalink {
|
||||
font-variant: small-caps;
|
||||
}
|
||||
|
||||
article > .meta > .timestamp {
|
||||
float: right;
|
||||
padding: 0.05em .5rem;
|
||||
font-variant: all-small-caps;
|
||||
}
|
||||
|
||||
article > .meta > .tags {
|
||||
display: inline;
|
||||
padding: 0 .5rem;
|
||||
@@ -99,6 +105,7 @@ article > .meta > .tags > span:first-child {
|
||||
}
|
||||
|
||||
article > .meta > .tags > .tag {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
article > .meta > .tags > .tag:not(:last-child):after {
|
||||
|
||||
Reference in New Issue
Block a user