I’ve some post with specific category, and I generate that category page manually using below codes.
{% for post in site.categories.myCategory %}
<li class="post_list">
<h2><a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a></h2>
<p>{{ post.content }}</p>
</li>
{% endfor %}
As you know post always have some date, and I want to display my latest post date in my category page. Here latest post means latest post in specific category(myCategory), not the latest one from all category
For example my latest post is 2019-05-05-exxample.md
so I want to display 5 may 2019 in my category page.
{{ site.time }}
gives me latest build date, but I want that date on which I’ve published specific post on specific category page. Right now I’m using date frontmatter in my category page and then get the date via {{ page.date | date_to_string}}
, but whenever I published new post on myCategory page, then I’ve to change the date on my front matter manually, so I’m looking for automatic solution which fetch latest post date on specific category page.