From 27c911c3ea5bc5c1a0db37003c72dbea3801319c Mon Sep 17 00:00:00 2001 From: Nicolas Kuttler Date: Thu, 12 Feb 2015 01:29:15 +0100 Subject: Display meta information about posts The date will be displayed with an ordinal indicator when available. --- _includes/postmeta.html | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 _includes/postmeta.html (limited to '_includes/postmeta.html') diff --git a/_includes/postmeta.html b/_includes/postmeta.html new file mode 100644 index 0000000..a44f36d --- /dev/null +++ b/_includes/postmeta.html @@ -0,0 +1,19 @@ +{% comment %} +This will use the ordinal plugin when it's available. This is not +possible on github pages (unless built locally and pushed there). +{% endcomment %} +

+ + Posted by + {% if node.email %} + {{ node.author }} + {% else %} + {{ node.author }} + {% endif %} + {% if node.date %} + {% assign ordinal=node.date | ordinal %} + on {{ node.date | date: "%B %-d" }}{% if ordinal != node.date %}{{ ordinal }}{% endif %} + {{ node.date | date: "%Y" }} + {% endif %} + +

-- cgit v1.2.3