docs: remove HTML comments causing banner gap to show (#1958)

* docs: remove HTML comments causing banner gap to show

Turns out the HTML comments get rendered, which causes an unsightly bar
to show up where the banner is even when not nightly.

* add comments back but use jinja comments

See: https://tedboy.github.io/jinja2/templ5.html

* add more context
This commit is contained in:
Clement Tsang authored and GitHub committed 2026-01-16 00:54:46 -05:00
1 parent 0cae59c81b
commit 99a993219e
2 files changed
+5 -3

No files matched your search

+3 -1
View File
@@ -28,8 +28,10 @@ sample_configs/testing*.toml
# Cargo-deny
deny.toml
# vscode
# Editors
.vscode
.zed
.idea
# mkdocs
site/
+2 -2
View File
@@ -1,8 +1,8 @@
{% extends "base.html" %}
{% block announce %}
<!-- It's like helm and you need to add dashes, see https://github.com/squidfunk/mkdocs-material/discussions/5803#discussioncomment-7690065 -->
{#- It's like helm and you need to add dashes, see https://github.com/squidfunk/mkdocs-material/discussions/5803#discussioncomment-7690065; note that _Jinja_ comments need to be used, not HTML -#}
{%- if config.extra.nightly -%}
<!-- Need to reapply margin from base CSS, which is overridden in extra CSS (to fix empty banner) -->
{#- Need to reapply margin from base CSS, which is overridden in extra CSS (to fix empty banner) -#}
<div style="margin: 0.6rem auto">
This is <strong>nightly</strong> documentation, and it may differ from stable. Please see <strong><a href="{{ '../' ~ base_url }}">here for stable documentation</a></strong>.
</div>