Repository navigation
Expand file tree
/
Copy pathcategories.html
More file actions
43 lines (42 loc) · 1.59 KB
/
Copy pathcategories.html
File metadata and controls
43 lines (42 loc) · 1.59 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
42
43
---
lang: en
layout: page
title: "Categories"
permalink: /categories/
footer_nav: true
nav_order: 8
description: >-
Every post on this blog by type (paper reviews, summaries and surveys, tech
guides, insights) and by topic.
---
{%- comment -%}
Every post twice: under its type (categories[0]) and its topic
(categories[1]), each in the order _data/post_conventions.yml lists them.
The ids are the slugs the post meta panel links to. Names are in display
case already ("Agentic-AI"), so replacing the separators is the whole job;
`capitalize` would make "Agentic Ai". `listed` drops a translation whose
original is listed (_plugins/translations.rb); a heading with no posts left
is skipped.
{%- endcomment -%}
{% assign spec = site.data.post_conventions %}
{% assign groups = "By type,By topic" | split: "," %}
{% for group in groups %}
{% if forloop.first %}{% assign names = spec.types %}{% else %}{% assign names = spec.topics %}{% endif %}
<h2>{{ group }}</h2>
{% for entry in names %}
{% assign cat = entry | first %}
{% assign cat_posts = site.categories[cat] | listed %}
{% if cat_posts.size == 0 %}{% continue %}{% endif %}
<h3 id="{{ cat | slugify }}">{{ cat | replace: "-", " " }}</h3>
<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 | escape }}</a>
</strong>
<span class="post-date">- {{ post.posted_at | date: site.date_format }}</span>
</li>
{% endfor %}
</ul>
{% endfor %}
{% endfor %}