Repository navigation
Expand file tree
/
Copy pathcategories.html
More file actions
41 lines (39 loc) · 1.52 KB
/
Copy pathcategories.html
File metadata and controls
41 lines (39 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
lang: en
layout: page
title: "Categories"
permalink: /categories/
description: >-
Every post on this blog grouped by category: paper reviews, summaries and
surveys, tech guides, and insights.
---
{%- comment -%}
Category names are already written in display case in front matter
("Agentic-AI", "Retrieval-Augmented-Generation"), so replacing the separators
is the whole job — which is what index.html and _layouts/post.html do. Not
`capitalize`: it lowercases everything after the first letter, so "Agentic-AI"
would render as "Agentic Ai".
`listed` drops a translation whose original is listed (_plugins/translations.rb).
The divider goes before each group after the first, so a category left empty by
the filter leaves no stray line behind.
{%- endcomment -%}
{% assign shown = false %}
{% for category in site.categories %}
{% capture cat %}{{ category | first }}{% endcapture %}
{% assign cat_posts = site.categories[cat] | listed %}
{% if cat_posts.size == 0 %}{% continue %}{% endif %}
{% if shown %}<hr>{% endif %}{% assign shown = true %}
{% assign cat_display = cat | replace: "-", " " | replace: "_", " " %}
<h2 id="{{ cat | slugify }}">{{ cat_display }}</h2>
<ul class="posts-list">
{% for post in cat_posts %}
<li>
<strong>
<a href="{{ post.url | prepend: site.baseurl }}" lang="{{ post.lang | default: site.lang }}">{{ post.title }}</a>
</strong>
<span class="post-date">- {{ post.date | date: site.date_format }}</span>
</li>
{% endfor %}
</ul>
{% endfor %}
<br>