build: strip internal markdown links from terminal manual

Modified build-manual.py to strip relative markdown links when concatenating fish-config.md, ensuring that terminal viewers (man, config-help) display clean text instead of un-clickable URLs. Starlight build logic remains untouched.
This commit is contained in:
2026-07-27 16:05:40 -04:00
parent f62404c692
commit bbe8aaf88d
3 changed files with 1322 additions and 1751 deletions
+1
View File
@@ -79,6 +79,7 @@ def build_concat(root: Path) -> str:
body = _with_entries(body, path, entries)
if body:
body = re.sub(r"<LinkButton.*?</LinkButton>\n*", "", body, flags=re.DOTALL)
body = re.sub(r"\[([^\]]+)\]\(/[^)]+\)", r"\1", body)
chunks.append(mt.shift_headings(body, depth))
return "\n\n".join(chunks) + "\n"
+1313 -1743
View File
File diff suppressed because it is too large Load Diff
+8 -8
View File
@@ -47,7 +47,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 for the full breakdown.
The configuration uses a structured file tree:
@@ -3214,7 +3214,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 for the full component breakdown.
## Change or Disable the Greeting
@@ -3235,7 +3235,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 for details.
## Secrets and Machine-Local Configuration
@@ -3259,7 +3259,7 @@ Disable it with:
set -U __fish_user_dots_symlink false
See [Personalization](/10-personalization/) for the full `local.fish` / `secrets.fish`
See Personalization for the full `local.fish` / `secrets.fish`
layout.
## Tool Init Does Nothing (Return Sentinel)
@@ -3276,7 +3276,7 @@ Fix: create a dedicated `conf.d/` file instead of appending to `config.fish`:
mytool init fish | source
All existing integrations (starship, zoxide, direnv) already have `conf.d/`
files. See [Return Sentinel](/09-installation/#return-sentinel) for background.
files. See Return Sentinel for background.
## Missing Dependencies
@@ -3299,7 +3299,7 @@ Or install everything missing and update what is installed:
fish-deps sync
See [Dependency Catalog](/06-dependency-catalog/) for the full list grouped by tier
See Dependency Catalog for the full list grouped by tier
(required, integrations, recommended).
## Vi Mode Keybindings
@@ -3319,7 +3319,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 for the full list of
what C3 controls.
## Minimal Mode / Disabling Opinionated Features
@@ -3352,7 +3352,7 @@ Re-enable everything:
Or use the interactive TUI: `config-settings`.
See [Opinionated Components (Minimal Mode)](/07-customization/#opinionated-components-minimal-mode) for the full
See Opinionated Components (Minimal Mode) for the full
component reference tables.
---