home-assistant.io/source/_includes/asides/recent_categories.html
Madelena Mak 138aa062ea
A wider website and documentation navigation revamp (#33601)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2024-07-16 13:40:34 +02:00

15 lines
818 B
HTML

{% capture recent_categories %}{% for post in site.posts limit: 20 %}{{ post.categories | join: ", " }}, {% endfor %}{% endcapture %}
{% assign recent_categories = recent_categories | split: ", " | uniq | compact %}
<section class="recent-categories aside-module grid__item one-whole lap-one-half">
<h1 class="title epsilon">{% icon "mdi:category" %} Recent categories</h1>
<ul class="divided">
{% for category in recent_categories limit: 10 %}
{% assign category_link = category | downcase %}
{{ category_name }}
<li><a href="/blog/categories/{{ category_link }}/">{{ category | replace: '-', ' '}} <span class="count">{{ site.categories[category] | size }}</span></a></li>
{% endfor %}
<li><a href="/blog/categories/announcements/">View all categories</a></li>
</ul>
</section>