Optional TOC sidebar (fixes #107)

This commit is contained in:
daudix
2024-12-01 16:55:08 +03:00
parent 73b2c24018
commit 915a71fecd
9 changed files with 83 additions and 0 deletions

View File

@ -15,6 +15,13 @@
{%- if config.extra.nav.links %}
{% include "partials/nav.html" %}
{%- endif %}
{%- if page.extra.toc_sidebar or section.extra.toc_sidebar -%}
<div id="sidebar">
<div>
{%- include "partials/toc.html" -%}
</div>
</div>
{%- endif -%}
<main id="main-content">
{% block custom %}{% endblock custom %}
{% block content %}{% endblock content %}

View File

@ -3,6 +3,8 @@
{% block content %}
<h1>{{ page.title }}</h1>
{%- include "partials/statements.html" -%}
{%- if page.extra.toc and not page.extra.toc_sidebar -%}
{%- include "partials/toc.html" -%}
{%- endif -%}
{{ page.content | safe }}
{% endblock content %}

View File

@ -3,6 +3,8 @@
{% block content %}
<h1>{{ section.title }}</h1>
{%- include "partials/statements.html" -%}
{%- if section.extra.toc and not section.extra.toc_sidebar -%}
{%- include "partials/toc.html" -%}
{%- endif -%}
{{ section.content | safe }}
{% endblock content %}