From 337855cfce856a3afd2d18ce4a625ccabde28716 Mon Sep 17 00:00:00 2001 From: daudix Date: Sun, 30 Mar 2025 07:51:32 +0300 Subject: [PATCH] Ability to turn on "go to top" button on regular pages (fixes #115) --- content/demo/index.md | 1 + templates/base.html | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/content/demo/index.md b/content/demo/index.md index 66f6794..a283693 100644 --- a/content/demo/index.md +++ b/content/demo/index.md @@ -1,6 +1,7 @@ +++ title = "Demo Page" [extra] +go_to_top = true styles = ["demo/demo.css"] scripts = ["demo/demo.js"] katex = true diff --git a/templates/base.html b/templates/base.html index bbec753..ee0f2d5 100644 --- a/templates/base.html +++ b/templates/base.html @@ -24,6 +24,11 @@ {%- endif -%}
{% block custom %}{% endblock custom %} + {%- if page.extra.go_to_top or section.extra.go_to_top -%} +
+ +
+ {%- endif -%} {% block content %}{% endblock content %} {% include "partials/extra_features.html" %}