From e267b9ddde323bf16db8df7f6a5ec30e0c55bc36 Mon Sep 17 00:00:00 2001 From: Kyler Date: Tue, 28 Oct 2025 00:50:54 -0600 Subject: [PATCH] Added permalinks --- convert.py | 2 ++ docs/styles.css | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/convert.py b/convert.py index 380a0fd..c3200fa 100644 --- a/convert.py +++ b/convert.py @@ -1,6 +1,7 @@ from pathlib import Path import markdown from markdown.extensions.wikilinks import WikiLinkExtension +from markdown.extensions.toc import TocExtension SOURCE_DIR = Path("docs") # input folder OUTPUT_DIR = Path("www") # output folder @@ -13,6 +14,7 @@ def convert_markdown_to_html(md_path: Path, html_path: Path): html_path.parent.mkdir(parents=True, exist_ok=True) md = markdown.Markdown(extensions=[ WikiLinkExtension(base_url='./', end_url='.html', build_url=my_url_builder), + TocExtension(permalink=True), 'tables', 'fenced_code', 'sane_lists', diff --git a/docs/styles.css b/docs/styles.css index bce637a..2ad7bae 100644 --- a/docs/styles.css +++ b/docs/styles.css @@ -30,6 +30,14 @@ a { color: #375899; } +a.headerlink { + color: #dddddd; +} + +a.headerlink:hover { + color: #375899; +} + /* p { font-size: 18px; margin-top: 16px;