categories

This commit is contained in:
Edgar 2021-12-24 12:14:57 +01:00
parent 8f6f860f89
commit 008b4ceb20
No known key found for this signature in database
GPG key ID: 8731E6C0166EAA85
2 changed files with 14 additions and 8 deletions

View file

@ -176,3 +176,7 @@ a.title {
.capitalize { .capitalize {
text-transform: capitalize; text-transform: capitalize;
} }
.category-link {
color: gray;
}

View file

@ -8,14 +8,16 @@
{% set section = get_section(path="blog/_index.md") %} {% set section = get_section(path="blog/_index.md") %}
<h2>Articles</h2> <h2>Articles</h2>
<ul class="posts"> <ul class="posts">
{% for page in section.pages %} {% for page in section.pages %}
<li> <li>
<span><time datetime="{{ page.date }}">{{ page.date }}</time>: </span> <span><time datetime="{{ page.date }}">{{ page.date }}</time>: </span>
<a href="{{ page.permalink }}" title="{{ page.description }}" <a href="{{ page.permalink }}" title="{{ page.description }}"
>{{ page.title }}</a >{{ page.title }}</a>
> | {% for category in page.taxonomies["categories"] %}
</li> <a class="category-link capitalize" href="/categories/{{category}}">{{ category }}</a>
{% endfor %} {% endfor %}
</li>
{% endfor %}
</ul> </ul>
{% endblock content %} {% endblock content %}