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.
This commit is contained in:
2026-07-27 16:45:39 -04:00
parent 8dba8a31fe
commit d9c8000f68
3 changed files with 12 additions and 11 deletions
+2 -1
View File
@@ -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' <LinkCard title="{safe_title}" href="#{slug}" />')
cardgrid = "<CardGrid>\n" + "\n".join(cards) + "\n</CardGrid>\n\n"
+9 -9
View File
@@ -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 (C1C6
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):
+1 -1
View File
@@ -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: