feat(config-help): add section linking for HTML and man page
Generate documentation / build-docs (push) Successful in 30s
Offline docs drift reminder / remind (push) Successful in 10s

- Section keyword is now extracted early and shared across all three
  output modes (pager, HTML, man) rather than duplicated per branch
- --html with a section keyword resolves the heading to a pandoc anchor
  ID and looks it up in docs/html/sitemap.json; handles both sub-section
  fragment paths and top-level sections that are their own page
- --man with a section keyword overrides MANPAGER to `less +/pattern`
  so the page opens at the nearest heading match
- --help output updated to show [section] in USAGE and section+flag
  examples (help config keybindings --html, help config pkg --man)
- docs/fish-config.md §5.14 synopsis, flags, and examples updated
- docs/fish-config.md §11 "Viewing" sections updated for both HTML and
  man page to document the section+flag invocation
- README table updated with section+html and section+man rows
This commit is contained in:
2026-06-08 23:15:06 -04:00
parent f4157fb4ba
commit 831c7beb4d
3 changed files with 149 additions and 77 deletions
+2
View File
@@ -46,7 +46,9 @@ To browse the docs from the terminal:
| `help config` | Open the terminal manual in the best available pager |
| `help config <keyword>` | Jump directly to a section matching the keyword |
| `help config --html` | Open the pre-built HTML docs in the default browser |
| `help config <keyword> --html` | Open HTML docs at the matching section anchor |
| `help config --man` | Open the compiled man page via `man -l` |
| `help config <keyword> --man` | Open the man page jumping to the nearest match |
The pager falls back through: **ov****bat****man -l****less****cat**.