Merge github.com:jerusdp/tabi into webmentions

This commit is contained in:
Jeremiah Russell 2025-02-11 12:58:00 +00:00
commit 6c6996b888
No known key found for this signature in database
GPG key ID: E576B835ACE207E5
18 changed files with 169 additions and 22 deletions

View file

@ -25,6 +25,13 @@
{%- set_global all_posts = all_posts | concat(with=section_item.pages) -%}
{%- endfor %}
{# Sort all posts by date #}
{%- set archive_reverse = section.extra.archive_reverse | default(value=false) -%}
{%- set all_posts = all_posts | sort(attribute="date") -%}
{%- if not archive_reverse -%}
{%- set all_posts = all_posts | reverse -%}
{%- endif -%}
{# Group posts by year. #}
{% set posts_by_year = all_posts | group_by(attribute="year") %}
{% set years = [] %}
@ -32,8 +39,13 @@
{% set_global years = years | concat(with=[year]) %}
{% endfor %}
{# Iterate over sorted & reversed years (newest to oldest). #}
{% for year in years | sort | reverse %}
{# Iterate over years #}
{% set years = years | sort %}
{%- if not archive_reverse -%}
{%- set years = years | reverse -%}
{%- endif -%}
{% for year in years %}
{% set posts = posts_by_year[year] %}
{% if posts | length > 0 %}
<li>

View file

@ -68,7 +68,9 @@
{%- if "dates" in metadata -%}
{%- set allowed_post_listing_dates = ["date", "updated", "both"] -%}
{%- set post_listing_date = config.extra.post_listing_date | default(value="date") -%}
{#- Calling the hierarchy macro here causes an error due to the "get parents" part of the macro. -#}
{#- This seems cleaner. -#}
{%- set post_listing_date = section.extra.post_listing_date | default(value=config.extra.post_listing_date) | default(value="date") -%}
{%- if post_listing_date not in allowed_post_listing_dates -%}
{{ throw(message="ERROR: Invalid value for config.extra.post_listing_date. Allowed values are 'date', 'updated', or 'both'.") }}
{%- endif -%}

View file

@ -16,7 +16,7 @@
<link rel="icon" type="image/png" href="{{ get_url(path=config.extra.favicon) }}"/>
{% endif %}
{% if config.extra.favicon_emoji %}
<link rel=icon href='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 105 55"><text y=".7em" font-size="82">{{ config.extra.favicon_emoji }}</text></svg>'>
<link rel=icon href='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50%" x="50%" dominant-baseline="central" text-anchor="middle" font-size="88">{{ config.extra.favicon_emoji }}</text></svg>'>
{% endif %}
{# Feeds #}

View file

@ -26,6 +26,10 @@
<main {% if more_than_one_section_shown %}class="{{ first_section }}-first"{% endif %}>
{%- if section.extra.header %}
{%- include "partials/home_banner.html" -%}
{%- elif section.content -%}
<section>
{{ section.content | safe }}
</section>
{% endif -%}
{% if section.extra.section_path -%}