fix(docs): render function entries per-section for the Starlight site #149
No Reviewers
Labels
Clear labels
Area/CI
Area/Completions
Area/Components
Area/Config
Area/Docs
Area/Functions
Area/Integrations
Area/Prompt & Theme
Area/Scripts
Area/Tests
Compat/Breaking
Kind/Bug
Kind/Chore
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Performance
Kind/Refactor
Kind/Security
Kind/Testing
good first issue
help wanted
.github/workflows and repository automation
completions/ - tab-completion scripts
The opinionated-component system (C1-C6)
config.fish and conf.d/ - startup and environment
docs/manual/ and the generated manual, man page, and site
functions/ - user-facing functions and helpers
integrations/ - third-party tool wiring
themes/ and prompt appearance
scripts/ - standalone helper scripts
tests/ - the syntax lint and functional suite
Breaking change that won't be backward compatible
Something is not working
Tooling, dependencies, and housekeeping
Documentation changes
Improve existing functionality
New functionality
Makes existing behavior faster or lighter
Restructures code without changing behavior
This is security issue
Issue or pull request related to testing
Well-scoped and self-contained; a good place to start
Maintainer is looking for someone to pick this up
Priority
Critical
1
The priority is critical
Priority
High
2
The priority is high
Priority
Medium
3
The priority is medium
Priority
Low
4
The priority is low
Reviewed
Confirmed
1
Issue has been confirmed
Reviewed
Duplicate
2
This issue or pull request already exists
Reviewed
Invalid
3
Invalid issue
Reviewed
Won't Fix
3
This issue won't be fixed
Status
Blocked
1
Something is blocking this issue or pull request
Status
Need More Info
2
Feedback is required to reproduce issue or to continue work
Status
Abandoned
3
Somebody has started to work on this but abandoned work
Milestone
No items
No Milestone
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: rootiest/fish-config#149
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Function entry pages on the Starlight site were formatted inconsistently:
cat's description and its single-argument Arguments section both rendered as unhighlighted code blocks,copy's Arguments rendered as a table with no heading, andltr's Arguments/Exit Status rendered as code blocks while its description rendered as prose. All three functions carry the same kind of content — the difference was purely which heuristic in the site pipeline happened to misfire.render_entry()output (one 4-space-indented block) and running it back throughprettify()'s paragraph-shape heuristics —_is_proserejects any paragraph with a line under 3 words (breaks on a short wrapped last line like "installed."), and_as_tablerequires at least 2 rows before it recognizes a table (breaks on a single-argument function). Which heuristic fired depended on incidental text shape, not on which section a block actually was.docs/build-manual.pygets a site-only renderer,render_entry_site, that builds each entry straight from the parsedfunctions/*.fishheader instead of reconstructing structure from indented text. Every present section (Synopsis, Description, Arguments, Exit Status, Returns, Notes, Example) gets its own### heading, so sections are independently scannable and jump-to-able as requested. Arguments/Exit Status become a table via a new_kv_rowscolumn parser; everything else is unwrapped into normal flowing paragraphs._kv_rowsalso fixes two real formatting bugs it uncovered while auditing every function's header for this: narrow columns where a long term leaves only one space before its description (rm.fish,auto-pull.fish), and name-only lines whose description wraps onto a deeper-indented continuation line (mkrep.fish's--new-remote [<cmd>]) — both previously fell through to an unhighlighted code block too.render_entry(the indented block pandoc/build_concatconsumes for the man page andconfig-help) is untouched;build_entries()takes a newsite: boolflag that selects which renderer runs, defaulting to the existing man-page behavior.Docs
docs/build-manual.pyanddocs/verify-manual.pyonly — nofunctions/*.fishheaders were changed, this is purely a rendering fix.docs/site/src/content/docs/is gitignored/generated by CI and not committed here.Verification
python3 docs/verify-manual.py— full suite passes (one pre-existing failure,test_render_registry_is_valid_fish_and_round_trips, is unrelated: it needs thefishbinary, which this sandbox doesn't have; confirmed it fails identically onmain)cat.fishreport) stays prose, a one-sentence Exit Status (the exactltr.fishreport) stays prose, the narrow-single-space-column and name-only-continuation cases in_kv_rows, prose sentences are correctly rejected as tables, and site/man-page entry coverage stays identicalpython3 docs/build-manual.py --siteregenerates the site content tree cleanlynpx astro buildindocs/site— all 161 pages build, internal link validation passes; spot-checked the rendered HTML forcat,copy,ltr, andmkrepand confirmed real<table>and<h3>elements (not literal|/#text)cat,copy,ltr,mkrep,gi,jr,agents-vault,rm,auto-pull, andfzf_configure_bindings— all now render with consistent headings/tables/proseTransferred from GitHub mirror PR https://github.com/rootiest/fish-config/pull/2 (branch pushed there instead of Gitea; mirror gets overwritten on next Gitea push).