excerpt | categories | layout | title | permalink | created | legacy-date |
---|---|---|---|---|---|---|
Archived posts by category and date. |
archive, site, admin |
page |
Archive |
/archive/ |
Posts in a given category can be reached at:
/category/[name of category]
Posts in a given date range can be reach at:
/archives/[year]
/archives/[year]/[month]
/archives/[year]/[month]/[day]
Post categories with corresponding number of posts:
-
{% assign categories = site.categories | sort %}
{% for category in site.categories %}
- {{ category[0] | replace:'-', ' ' }} ({{ category | last | size }}) {% endfor %}
Posts by year with corresponding number of posts:
-
{% assign counter = 0 %}
{% for post in site.posts %}
{% if post.date %}
{% assign thisyear = post.date | date: "%Y" %}
{% assign prevyear = post.previous.date | date: "%Y" %}
{% endif %}
{% assign counter = counter | plus: 1 %}
{% if thisyear != prevyear %}
- {{ thisyear }} ({{ counter }}) {% assign counter = 0 %} {% endif %} {% endfor %}