From 8d66e8e2b32fb449ba338db1331b7b6a19c99589 Mon Sep 17 00:00:00 2001 From: david-swift Date: Thu, 27 Feb 2025 17:12:51 +0100 Subject: [PATCH] Remove sidebar table of contents #1 --- content/_index.md | 2 -- content/mods/index.md | 1 - templates/base.html | 7 ------- templates/page.html | 2 +- templates/section.html | 2 +- 5 files changed, 2 insertions(+), 12 deletions(-) diff --git a/content/_index.md b/content/_index.md index 1ce88ef..49e3ae7 100644 --- a/content/_index.md +++ b/content/_index.md @@ -100,11 +100,9 @@ Configuration variables from `config.toml` that can be set/overriden per page/se - `styles`: Additional CSS styles; expects them to be in the `./static/` directory. If you are using Sass it will be generated there automatically. - `scripts`: Additional JavaScript scripts; expects them to be in the `./static/` directory. - `katex`: Whether to enable the KaTeX library for rendering LaTeX. - - `toc`: Enables table of contents. Only first 2 levels of headings are listed. - `toc_inline`: Whether to render inline table of contents at the top of all pages, in addition to floating quick navigation buttons. - `toc_ordered`: Whether to use numbered (ordered) list for table of contents. -- `toc_sidebar`: Whether to display table of contents as a sidebar (useful for long pages). Other variables: diff --git a/content/mods/index.md b/content/mods/index.md index 505e24d..30436bc 100644 --- a/content/mods/index.md +++ b/content/mods/index.md @@ -2,7 +2,6 @@ title = "Mods" [extra] toc = true -toc_sidebar = true +++ Mods enhance/change some Duckquill visuals. They are updated alongside Duckquill to ensure that you don't need to manually update them every release. diff --git a/templates/base.html b/templates/base.html index bbec753..45d9216 100644 --- a/templates/base.html +++ b/templates/base.html @@ -15,13 +15,6 @@ {%- if config.extra.nav.links %} {% include "partials/nav.html" %} {%- endif %} - {%- if page.extra.toc_sidebar or section.extra.toc_sidebar -%} - - {%- endif -%}
{% block custom %}{% endblock custom %} {% block content %}{% endblock content %} diff --git a/templates/page.html b/templates/page.html index 1cdcdac..942597f 100644 --- a/templates/page.html +++ b/templates/page.html @@ -3,7 +3,7 @@ {% block content %}

{{ page.title }}

{%- include "partials/statements.html" -%} -{%- if page.extra.toc and not page.extra.toc_sidebar -%} +{%- if page.extra.toc -%} {%- include "partials/toc.html" -%} {%- endif -%} {{ page.content | safe }} diff --git a/templates/section.html b/templates/section.html index c5aded2..3ba4d84 100644 --- a/templates/section.html +++ b/templates/section.html @@ -3,7 +3,7 @@ {% block content %}

{{ section.title }}

{%- include "partials/statements.html" -%} -{%- if section.extra.toc and not section.extra.toc_sidebar -%} +{%- if section.extra.toc -%} {%- include "partials/toc.html" -%} {%- endif -%} {{ section.content | safe }}