feat: with safe links
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
Kasper Juul Hermansen 2023-10-24 10:13:42 +02:00
parent d30619374d
commit 318b7ff9d4
Signed by: kjuulh
GPG Key ID: 57B6E1465221F912
3 changed files with 7 additions and 7 deletions

View File

@ -3,7 +3,7 @@
{%- for page in pages %} {%- for page in pages %}
<section class="list-item"> <section class="list-item">
<h1 class="title text-peach"> <h1 class="title text-peach">
<a href={{ page.permalink }}>{{page.title}}</a> <a href={{ page.permalink | safe }}>{{page.title}}</a>
</h1> </h1>
<div class="meta"> <div class="meta">
@ -27,7 +27,7 @@
</div> </div>
{% if not hide_read_more %} {% if not hide_read_more %}
<a class="readmore text-peach" href={{ page.permalink }}>Read more ⟶</a> <a class="readmore text-peach" href={{ page.permalink | safe }}>Read more ⟶</a>
{% endif %} {% endif %}
</section> </section>

View File

@ -1,10 +1,10 @@
{% macro page_back_link(page) %} {% macro page_back_link(page) %}
{% set top_section = get_section(path=page.ancestors | last) %} {% set top_section = get_section(path=page.ancestors | last) %}
<a class="previous" href="{{ top_section.permalink }}"> back</a> <a class="previous" href="{{ top_section.permalink | safe }}"> back</a>
{% endmacro page_back_link %} {% endmacro page_back_link %}
{% macro section_back_link(section) %} {% macro section_back_link(section) %}
{% set top_section = get_section(path=section.ancestors | last) %} {% set top_section = get_section(path=section.ancestors | last) %}
<a class="previous" href="{{ top_section.permalink }}"> back</a> <a class="previous" href="{{ top_section.permalink | safe }}"> back</a>
{% endmacro section_back_link %} {% endmacro section_back_link %}

View File

@ -2,7 +2,7 @@
{% block extra_head %} {% block extra_head %}
<link rel="canonical" href="{{ page.permalink }}"> <link rel="canonical" href="{{ page.permalink | safe }}">
{% endblock extra_head %} {% endblock extra_head %}
{% block title %} {% block title %}
@ -30,10 +30,10 @@
{% if page.lower or page.higher %} {% if page.lower or page.higher %}
<div class="flex place-content-around max-w-lg mx-auto"> <div class="flex place-content-around max-w-lg mx-auto">
{% if page.lower %} {% if page.lower %}
<a class="previous" href="{{ page.lower.permalink }}"> {{ page.lower.title }}</a> <a class="previous" href="{{ page.lower.permalink | safe }}"> {{ page.lower.title }}</a>
{% endif %} {% endif %}
{% if page.higher %} {% if page.higher %}
<a class="next" href="{{ page.higher.permalink }}">{{ page.higher.title }} </a> <a class="next" href="{{ page.higher.permalink | safe }}">{{ page.higher.title }} </a>
{% endif %} {% endif %}
</div> </div>
{% endif %} {% endif %}