contributing.md
2.34 KB
7. Contributing
How to fix or extend this wiki.
Quick fix (a typo, a sentence)
- Edit the relevant
.mdfile underdocs/. - Run
mkdocs buildto regenerate the static site undersite/, ormkdocs serveto preview live. - Commit when satisfied.
The wiki lives on this machine — there is no remote, no CI, no Pages.
Anyone reading the wiki opens site/index.html locally or runs
mkdocs serve themselves.
Local dev (preview while editing)
cd xly-wiki
source .venv/bin/activate # or: python3 -m venv .venv && pip install -r requirements.txt
mkdocs serve # http://127.0.0.1:8000 with live reload
Regenerate the auto-catalog
python scripts/gen_catalog.py # reads recon/*.tsv, writes docs/auto-catalog/**
If the source TSVs are stale, first re-run the schema dump:
../recon/dump.sh # pulls fresh information_schema data
Pre-commit hook (optional but recommended for local edits)
Install once:
ln -s ../../scripts/precommit.sh .git/hooks/pre-commit
chmod +x scripts/precommit.sh
The hook runs mkdocs build --strict on every commit so broken cross-refs are
caught before they land in a commit.
Style
-
Markdown source is the source of truth. Static HTML in
site/is generated; never hand-edit it. - English prose. Chinese terms preserved untranslated in body text. The Glossary is the one place translations live.
- Slices are the only place narrative belongs. Concepts and reference pages stay short — if a concept page grows past ~300 words, that content probably wants to be a slice instead.
- Auto-catalog pages are not hand-edited. Cross-link into them from hand-written content; never the other way.
- Cross-link liberally. Every framework-table mention in a slice should link to its auto-catalog page. Every concept term should link to its Concepts page on first mention.
Adding a new slice
- Create
docs/slices/NN-<name>.md. - Add it to
mkdocs.ymlnav. - Document the slice end-to-end (one UI action, all layers).
- Cross-link every term to Concepts; every table/proc to Auto-Catalog.
- Update the Slices index table.
Adding a new concept
Only add a concept page when at least one slice introduces it. Concepts that nothing references are dead weight.