docs: migrate the manual to a Starlight documentation site #72
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
No labels
Milestone
No items
No Milestone
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: rootiest/fish-config#72
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.
Replaces the hand-maintained
docs/fish-config.mdmonolith and the chunkedHTML/wiki output with a
docs/manual/**source-of-truth tree and an AstroStarlight site built from it.
What changed
New SSOT.
docs/fish-config.mdwas split intodocs/manual/**— one fileper section, one directory for the 14 function categories, each carrying YAML
frontmatter (
title,manTitle,sidebar.order,helpKeywords). Everythingdownstream is generated from this tree.
Generated outputs.
docs/build-manual.pyproduces the concatenatedmarkdown (pandoc's input for the man page) and the Starlight content
collection.
docs/manualtools.pyholds the shared frontmatter/orderinglibrary. A round-trip test asserts the concat reproduces the original file
byte-for-byte, so the man page cannot silently drift.
Retired.
docs/split-wiki.py,docs/wiki/**, and the chunked-HTMLpipeline. The old wiki generator has no remaining callers.
Site. Astro Starlight in
docs/site/, Catppuccin Mocha/Latte, Pagefindfull-text search, deployed to Cloudflare Pages by
.gitea/workflows/build-docs.ymlon push to
main.Syntax highlighting. The manual is authored man-page style — every
synopsis, example, option table, and description sits in one 4-space-indented
block, which declares no language and renders as an unhighlighted grey slab.
The site build now splits each block into paragraphs and classifies them:
synopsis and shell examples become fenced
fish, descriptions become prose,and column-aligned reference tables keep their indentation. 175 blocks
highlight; the 412 lines of genuine tables are untouched.
This transform is site-only.
docs/manual/**keeps the indented form thatpandoc and
config-helpdepend on, and a test fails if a fence is everwritten back to the SSOT.
config-help. Now resolves sections against the manual tree's headingsand gained a
--htmlflag that opens the site.Deployment prerequisite
The Cloudflare Pages project must exist before CI can deploy to it. Create
fish-config-docsin Direct Upload mode and seed it with the pre-builtbundle (
docs/site/dist/, also zipped at~/fish-config-docs-site.zip), thenadd repository secrets
CF_API_TOKEN(scope: Cloudflare Pages: Edit) andCF_ACCOUNT_ID. Until those exist the deploy step fails; nothing else in theworkflow depends on it.
Manual Verification
python3 docs/verify-manual.pyreports 16/16 passingcd docs/site && npx astro buildcompletes and emits 120 pagesnpx astro preview— code blocks on/functions/file-and-directory/rm/are syntax-highlighted in Catppuccin colours, not flat grey
pkgpage keeps its package-manager query table column-alignedrather than fencing it as shell
"Overview", with title-cased category names
mkcd)help configopens the terminal manual and paginateshelp config abbreviationsjumps to the Abbreviations sectionhelp config --manrenders the compiled man page with correct headingshelp config --htmlopens the documentation sitegit diff main -- docs/fish-config.mdshows only regeneration noise,no content loss
Replace .lstrip('\n') with .removeprefix("\n") to preserve body text that legitimately starts with blank lines. The serialize() function inserts exactly one separator newline; removing only that one newline (via removeprefix) rather than all leading newlines (via lstrip) maintains parse/serialize roundtrip losslessness. Adds regression test to verify bodies with leading blank lines roundtrip correctly.