From 3cb07e46ab4f5dd71fdfe9035ccff2ab4b97d6cc Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Sun, 22 Sep 2024 15:08:36 -0400 Subject: [PATCH] Use anchorlinks rather than permalinks --- docs/stylesheets/extra.css | 9 +++++++++ mkdocs.template.yml | 5 +++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css index 1a2956f165fb..8e2b9b9f5475 100644 --- a/docs/stylesheets/extra.css +++ b/docs/stylesheets/extra.css @@ -186,3 +186,12 @@ h3.cli-reference { font-size: 1.1em; margin: 0 0 0 0; } + +/* Styling for anchor link headers */ +.toclink { + color: unset !important; +} + +.toclink:hover { + color: var(--md-accent-fg-color) !important; +} diff --git a/mkdocs.template.yml b/mkdocs.template.yml index 6e40ea25c74c..cf14bd2bafe2 100644 --- a/mkdocs.template.yml +++ b/mkdocs.template.yml @@ -42,11 +42,12 @@ site_dir: site/uv markdown_extensions: - admonition - pymdownx.details - - toc: - permalink: "#" - pymdownx.snippets: - pymdownx.magiclink: - attr_list: + - toc: + anchorlink: true + anchorlink_class: "toclink" - md_in_html: - pymdownx.inlinehilite: - pymdownx.superfences: