toc relative hrefs

This commit is contained in:
anarsec 2024-04-15 14:07:54 +00:00
parent 6d538524d5
commit 022d014abc
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View file

@ -1,4 +1,4 @@
base_url = "https://anarsec.guide" base_url = "https://www.anarsec.guide"
title = "AnarSec" title = "AnarSec"
default_language = "en" default_language = "en"
theme = "DeepThought" theme = "DeepThought"

View file

@ -53,14 +53,14 @@
{% for h1 in page.toc %} {% for h1 in page.toc %}
<li> <li>
<a id="link-{{h1.id}}" class="toc {% if loop.first %}is-active{% endif %}" <a id="link-{{h1.id}}" class="toc {% if loop.first %}is-active{% endif %}"
href="{{ h1.permalink | safe }}"> href="#{{ h1.id | safe }}">
{{ h1.title }} {{ h1.title }}
</a> </a>
{% if h1.children %} {% if h1.children %}
<ul> <ul>
{% for h2 in h1.children %} {% for h2 in h1.children %}
<li> <li>
<a id="link-{{h2.id}}" class="toc" href="{{ h2.permalink | safe }}"> <a id="link-{{h2.id}}" class="toc" href="#{{ h2.id | safe }}">
{{ h2.title }} {{ h2.title }}
</a> </a>
</li> </li>