Skip to content

Commit

Permalink
#49 Add if statement for showing post date
Browse files Browse the repository at this point in the history
  • Loading branch information
LeNPaul committed May 29, 2021
1 parent 5f3afb7 commit 120a671
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,9 @@ <h1>
{{ page.title }}
</h1>

<span class="post-date">
{{ site.data.settings.post_date_prefix }}
{% assign d = page.date | date: "%-d" %}
{{ page.date | date: "%B" }}
{% case d %}
{% when '1' or '21' or '31' %}{{ d }}st
{% when '2' or '22' %}{{ d }}nd
{% when '3' or '23' %}{{ d }}rd
{% else %}{{ d }}th{% endcase %},
{{ page.date | date: "%Y" }}
by
{% if page.author %}
{{ page.author }}
{% else %}
{{ site.author }}
{% endif %}
</span>
{% if site.hide_post_date != true %}
{% include post-date.html %}
{% endif %}

{% if page.image %}
<div class="featured-image">
Expand Down

0 comments on commit 120a671

Please sign in to comment.