From 052ae825fa6a3e6d695653e9e5c6451a5472ab95 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 6 Nov 2026 01:40:09 +0000 Subject: [PATCH] Sites: GitHub's heading ids, reference tables' first column unwrapped Headings get the ids GitHub gives them (pymdownx's slugify, lower case), so a docs/ link to a heading like "USB modems (`--usb`)" works on the site as on GitHub. A reference table's option or key stays on one line. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01B82eRSqjp9Pn2KBr9N9LAn --- pages/mkdocs-base.yml | 5 +++++ pages/theme/assets/suite/d-modem.css | 3 +++ 2 files changed, 8 insertions(+) diff --git a/pages/mkdocs-base.yml b/pages/mkdocs-base.yml index bed964d..bb5c353 100644 --- a/pages/mkdocs-base.yml +++ b/pages/mkdocs-base.yml @@ -43,6 +43,11 @@ markdown_extensions: - tables - toc: permalink: true + # headings' ids as GitHub makes them ("USB modems (`--usb`)" is + # usb-modems---usb), so links that work on GitHub work on the site + slugify: !!python/object/apply:pymdownx.slugs.slugify + kwds: + case: lower - pymdownx.details - pymdownx.highlight: anchor_linenums: true diff --git a/pages/theme/assets/suite/d-modem.css b/pages/theme/assets/suite/d-modem.css index 0b3382f..c2b3694 100644 --- a/pages/theme/assets/suite/d-modem.css +++ b/pages/theme/assets/suite/d-modem.css @@ -63,3 +63,6 @@ .md-typeset h1 { color: var(--md-default-fg-color); font-weight: 600; } [data-md-color-scheme="slate"] .md-footer, [data-md-color-scheme="slate"] .md-footer-meta { background-color: var(--suite-panel); } + +/* reference tables: an option or key in the first column on one line */ +.md-typeset td:first-child code { white-space: nowrap; }