From d9c8000f68613902950d6b1769e496ead56493d3 Mon Sep 17 00:00:00 2001 From: rootiest Date: Mon, 27 Jul 2026 16:45:39 -0400 Subject: [PATCH] fix(docs): update python slugifier to match starlight/github rules Modified build-manual.py to strip punctuation and properly handle spaces/hyphens during link slug generation. This ensures top navigation link cards generated by the script actually match Starlight's URL format. Also fixed a few manual markdown links that mistakenly contained double dashes. --- docs/build-manual.py | 3 ++- docs/manual/11-troubleshooting.md | 18 +++++++++--------- docs/manual/index.md | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/docs/build-manual.py b/docs/build-manual.py index 06d33ee..eef32c1 100644 --- a/docs/build-manual.py +++ b/docs/build-manual.py @@ -621,7 +621,8 @@ def _inject_subheading_cards(body: str) -> str: cards = [] for title in headings: safe_title = _jsx_attr_escape(title) - slug = re.sub(r"[^a-z0-9]+", "-", title.lower()).strip("-") + slug = re.sub(r"[^\w\s-]", "", title.lower()) + slug = re.sub(r"[-\s]+", "-", slug).strip("-") cards.append(f' ') cardgrid = "\n" + "\n".join(cards) + "\n\n\n" diff --git a/docs/manual/11-troubleshooting.md b/docs/manual/11-troubleshooting.md index d4bb685..ec97710 100644 --- a/docs/manual/11-troubleshooting.md +++ b/docs/manual/11-troubleshooting.md @@ -91,7 +91,7 @@ Re-enable: set -Ue __fish_config_op_logging -See [C5 — Logging and Capture](/07-customization/#c5--logging-and-capture) for the full component breakdown. +See [C5 — Logging and Capture](/07-customization/#c5-logging-and-capture) for the full component breakdown. ## Change or Disable the Greeting @@ -112,7 +112,7 @@ testing): set -Ue __fish_config_first_run_complete -See [C6 — Greeting and First-Run UI](/07-customization/#c6--greeting-and-first-run-ui) for details. +See [C6 — Greeting and First-Run UI](/07-customization/#c6-greeting-and-first-run-ui) for details. ## Secrets and Machine-Local Configuration @@ -196,7 +196,7 @@ overrides): set -U __fish_config_op_overrides off -See [C3 — Key and Environment Overrides](/07-customization/#c3--key-and-environment-overrides) for the full list of +See [C3 — Key and Environment Overrides](/07-customization/#c3-key-and-environment-overrides) for the full list of what C3 controls. ## What's with the C1-C6 stuff? @@ -205,12 +205,12 @@ This configuration groups its opinionated behaviors into six categories (C1–C6 Category Description ────────────────────────────────────────────────────────────────────────── - C1 [Command Shadows](/07-customization/#c1--command-shadows) (aliases that replace default tools) - C2 [Auto-Exec](/07-customization/#c2--auto-exec) (background tasks and startup side-effects) - C3 [Key & Env Overrides](/07-customization/#c3--key-and-environment-overrides) (Vi mode, PAGER) - C4 [Terminal Integrations](/07-customization/#c4--terminal-integrations) (Kitty, WezTerm) - C5 [Logging and Capture](/07-customization/#c5--logging-and-capture) (session logs, command duration) - C6 [Greeting & First-Run UI](/07-customization/#c6--greeting-and-first-run-ui) (custom startup banner) + C1 [Command Shadows](/07-customization/#c1-command-shadows) (aliases that replace default tools) + C2 [Auto-Exec](/07-customization/#c2-auto-exec) (background tasks and startup side-effects) + C3 [Key & Env Overrides](/07-customization/#c3-key-and-environment-overrides) (Vi mode, PAGER) + C4 [Terminal Integrations](/07-customization/#c4-terminal-integrations) (Kitty, WezTerm) + C5 [Logging and Capture](/07-customization/#c5-logging-and-capture) (session logs, command duration) + C6 [Greeting & First-Run UI](/07-customization/#c6-greeting-and-first-run-ui) (custom startup banner) Disable all opinionated features at once (Minimal Mode): diff --git a/docs/manual/index.md b/docs/manual/index.md index 9b9fad0..fcc6d4a 100644 --- a/docs/manual/index.md +++ b/docs/manual/index.md @@ -35,7 +35,7 @@ output, file contents, and secrets printed to the terminal. Nothing leaves your machine, but the files persist locally. - Disable all logging with: `set -U __fish_config_op_logging off` - Prefer a menu? Run the interactive picker: `config-settings` -- See [C5 — Logging and Capture](/07-customization/#c5--logging-and-capture) for the full breakdown. +- See [C5 — Logging and Capture](/07-customization/#c5-logging-and-capture) for the full breakdown. The configuration uses a structured file tree: