fix(templates): strip base_url from nav hrefs and unescape image src URLs

This commit is contained in:
2026-05-21 00:33:28 +02:00
parent e9040f66c5
commit 6b877b6100
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -28,7 +28,7 @@
{% set top = get_section(path="_index.md") %}
{% for p in top.subsections %}
{% set sub = get_section(path=p) %}
<li><a href="{{ sub.permalink }}">{{ sub.title }}</a></li>
<li><a href="{{ sub.permalink | replace(from=config.base_url, to='') | safe }}">{{ sub.title }}</a></li>
{% endfor %}
</ul>
</div>
+1 -1
View File
@@ -5,7 +5,7 @@
{%- set source_path = "static/images/" ~ src -%}
{%- set resized = resize_image(path=source_path, width=width, op="fit_width", quality=85) -%}
<img
src="{{ resized.url }}"
src="{{ resized.url | safe }}"
width="{{ resized.width }}"
height="{{ resized.height }}"
alt="{{ alt }}"
+2 -2
View File
@@ -35,7 +35,7 @@
<ul class="col-sm-{{ col_width | round }}">
<li class="dropdown-header">{{ child.title }}</li>
{%- for cpage in child.pages -%}
<li><a href="{{ cpage.permalink }}">{{ cpage.title }}</a></li>
<li><a href="{{ cpage.permalink | replace(from=config.base_url, to='') | safe }}">{{ cpage.title }}</a></li>
{%- endfor -%}
</ul>
</li>
@@ -44,7 +44,7 @@
</li>
{%- else -%}
<li class="{% if current_url and current_url is starting_with(sub.permalink) %}active{% endif %}">
<a href="{{ sub.permalink }}">{{ sub.title }}</a>
<a href="{{ sub.permalink | replace(from=config.base_url, to='') | safe }}">{{ sub.title }}</a>
</li>
{%- endif -%}
{%- endfor -%}