(or: I already mentioned it's a very old Jekyll setup)


Turns out I did make it to item #984 on my TODOs.
Upgrading Jekyll has proven to be far easier than migrating to Hugo.
There were only 2 issues to tackle:

Issue 1 - Generating Categories and Tags in Jekyll 4.x.x

The old scripts of generate_categories.rb and generate_tags.rb and their corresponding liquid filters: tag_links and category_links no longer seem to do the trick in Jekyll 4.
Is it likely possible to fix these functions and keep using the liquid filters? Probably. Is it necessary? Nope.

It's much easier to just build a template that does the same job and is certainly more future-proof.
In short, this was the old template:

old_template.html
1
2
3
<!-- This used to work for Jekyll 2 -->
<div class="post-tags">Tagged with <span>{{ post.tags | tag_links }}</span></div>
<div class="post-category">Posted in <span>{{ post.categories | category_links }}</span></div>
new_template.html
1
2
3
4
5
6
7
8
9
10
11
{% comment %}<!-- TODO put this in a separate include to save some trouble. Obviously there's some room for improvement here. -->{% endcomment %}
<div class="post-tags">Tagged with <span>
  {% for tag in post.tags %}
  <a class="tag" href="{{ "/tag/" | append: tag | downcase | replace: " ", "-" | uri_escape }}">{{ tag }}</a>{% if forloop.last %}{% else %}, {% endif %}
  {% endfor %}
</span></div>
<div class="post-category">Posted in <span>
  {% for category in post.categories %}
  <a class="category" href="{{ "/category/" | append: category | downcase | replace: " ", "-" | uri_escape }}">{{ category }}</a>{% if forloop.last %}{% else %}, {% endif %}
  {% endfor %}
</span></div>
Full example here (including the old scripts and new template).

Issue 2 - Unrendered liquid in Paginator

On generated pages (page/##) I was getting unrendered Jekyll liquid code for my meta_description.
Why? Not sure. A relatively simple IF change helped handle this and grab the correct parts -
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{% unless page.url == '/' %}
  {% if page.meta_description %}
    {% capture meta_desc %}{{ page.meta_description }}{% endcapture %}
  {% elsif page.excerpt %}
    {% capture meta_desc %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% endcapture %}
  {% elsif page.content %}
    {% if page.content contains "for post in paginator.posts" %}
      {% capture meta_desc %}{{ paginator.posts | first | strip_html | strip_newlines | strip | split: " - " | first | truncate: 160 }}{% endcapture %}
    {% else %}
      {% capture meta_desc %}{{ page.content | strip_html | strip_newlines | strip | truncate: 160 }}{% endcapture %}
    {% endif %}
  {% endif %}
{% endunless %}
{% endcapture %}
<meta name="description" content="{{ meta_desc }}">
This ended up giving me the same meta_descriptions as I used to get on Jekyll 2.x.

The good news is that the build time has decreased by 10X!
The really good news is that it's now fully within GitHub Actions!