Merge branch 'welpo:main' into local_image_dark

This commit is contained in:
Poolitzer 2026-01-01 23:34:55 +01:00 committed by GitHub
commit 660e837f95
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 190 additions and 21 deletions

View file

@ -15,3 +15,12 @@
{%- set feed_url = feed_utils::get_feed_url() -%}
{{- generate_feed and config.extra.feed_icon and feed_url -}}
{%- endmacro should_show_footer_feed_icon -%}
{#- Get feed icon name: string value or "rss" for true, empty for false -#}
{%- macro get_feed_icon_name() -%}
{%- if config.extra.feed_icon is string -%}
{{- config.extra.feed_icon -}}
{%- elif config.extra.feed_icon -%}
{{- "rss" -}}
{%- endif -%}
{%- endmacro get_feed_icon_name -%}

View file

@ -9,8 +9,9 @@
{{ title -}}
{% if show_feed_icon %}
{%- set feed_url = feed_utils::get_feed_url() -%}
{%- set feed_icon_name = feed_utils::get_feed_icon_name() -%}
<a class="no-hover-padding social" rel="{{ rel_attributes }}" {{ blank_target }} href="{{ get_url(path=term.path ~ feed_url, lang=lang, trailing_slash=false) | safe }}">
<img loading="lazy" alt="feed" title="feed" src="{{ get_url(path='/social_icons/rss.svg') }}">
<img loading="lazy" alt="feed" title="feed" src="{{ get_url(path='/social_icons/' ~ feed_icon_name ~ '.svg') }}">
</a>
{% endif %}
</h1>

View file

@ -46,6 +46,10 @@
{%- if macros_settings::evaluate_setting_priority(setting="katex", page=page_s, section=section_s, default_global_value=false) == "true" -%}
<link rel="stylesheet" href="{{ get_url(path='katex.min.css', trailing_slash=false) | safe }}">
<script defer src="{{ get_url(path='js/katex.min.js', trailing_slash=false) | safe }}"></script>
{# Load mhchem extension if chemistry formulas detected #}
{%- if page and page.content and ("\ce{" in page.content or "\pu{" in page.content) -%}
<script defer src="{{ get_url(path='js/mhchem.min.js', trailing_slash=false) | safe }}"></script>
{%- endif -%}
{%- endif -%}
{# Load mermaid.js #}

View file

@ -6,6 +6,7 @@
{#- Feed icon -#}
{%- set feed_url = feed_utils::get_feed_url() -%}
{%- set feed_icon_name = feed_utils::get_feed_icon_name() -%}
{%- set should_show_feed = feed_utils::should_show_footer_feed_icon() == "true" -%}
{%- set should_show_footer_icons = should_show_feed or config.extra.socials or config.extra.email -%}
@ -18,7 +19,7 @@
{%- if should_show_feed -%}
<li>
<a class="nav-links no-hover-padding social" rel="{{ rel_attributes }}" {{ blank_target }} href="{{ get_url(path=feed_url, lang=lang, trailing_slash=false) | safe }}">
<img loading="lazy" alt="feed" title="feed" src="{{ get_url(path='/social_icons/rss.svg') }}">
<img loading="lazy" alt="feed" title="feed" src="{{ get_url(path='/social_icons/' ~ feed_icon_name ~ '.svg') }}">
</a>
</li>
{%- endif -%}