diff options
author | Nicolas Kuttler <git@kuttler.eu> | 2015-02-13 09:53:21 +0100 |
---|---|---|
committer | Nicolas Kuttler <git@kuttler.eu> | 2015-02-13 09:53:21 +0100 |
commit | 53bf0046ea4f3a1dca5ab34e30cdcc989a6b3014 (patch) | |
tree | 48b8d25e13142f029f4fece6d9ea5e207dd08c05 /_includes | |
parent | e5fd3b330b54926123abaa4bee998d8b5d8ef089 (diff) | |
download | irssi.github.io-53bf0046ea4f3a1dca5ab34e30cdcc989a6b3014.zip |
Make meta info entirely optional
Diffstat (limited to '_includes')
-rw-r--r-- | _includes/postmeta.html | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/_includes/postmeta.html b/_includes/postmeta.html index d71b943..4a4d5b3 100644 --- a/_includes/postmeta.html +++ b/_includes/postmeta.html @@ -1,19 +1,24 @@ {% assign node=include.node %} -<p> - <small> - Posted by - {% if node.web %} - <a href="{{ node.web }}">{{ node.author }}</a> - {% elsif node.email %} - <a href="mailto:{{ node.email }}">{{ node.author }}</a> - {% else %} - {{ node.author }} - {% endif %} +{% if node.author or node.date %} + <p> + <small> + Posted + {% if node.author %} + by + {% if node.web %} + <a href="{{ node.web }}">{{ node.author }}</a> + {% elsif node.email %} + <a href="mailto:{{ node.email }}">{{ node.author }}</a> + {% else %} + {{ node.author }} + {% endif %} + {% endif %} - {% if node.date %} - {% assign ordinalize = node.date | date: "%-d" %} - on {{ node.date | date: "%B %-d" }}<sup>{% include ordinal.html ordinalize=ordinalize %}</sup> - {{ node.date | date: "%Y" }} - {% endif %} - </small> -</p> + {% if node.date %} + {% assign ordinalize = node.date | date: "%-d" %} + on {{ node.date | date: "%B %-d" }}<sup>{% include ordinal.html ordinalize=ordinalize %}</sup> + {{ node.date | date: "%Y" }} + {% endif %} + </small> + </p> +{% endif %} |