This is the source code for the Lux Documentation Site.
This project uses the Diátaxis framework. Before contributing, read its description of each dimension to understand the distinctions between tutorials, how-to guides, explanations, and reference.
nix develop .#If you use nix-direnv:
echo "use flake .#" > .envrc && direnv allowbun run buildThis builds the site with Docusaurus. Open build/ in a browser or use
bun run start for hot reload.
or, alternatively:
yarn build
yarn serve
If changing package.json, update the lockfile:
yarn installThe CI build uses yarn install --frozen-lockfile, so the lockfile must be kept in sync.
- Create a new
.mdfile indocs/guides/. - Write in imperative mood. Start each step with a verb.
- Minimise commentary. Do not explain concepts. Link to explanations or reference instead.
- Address a single, practical goal (e.g. "How to add a dependency").
- Add a
---id in the front matter that matches the file name (without extension). - Register the guide in
sidebars.jsunder theguidescategory.
- Create a new
.mdfile indocs/tutorial/. - Assume no prior knowledge of the tool. Write step-by-step from start to finish.
- Unlike how-to guides, tutorials may explain and contextualise as the user progresses.
- Keep the scope narrow enough for a newcomer to follow in one sitting.
- Register in
sidebars.jsunder thetutorialcategory.
- Create a new
.mdfile indocs/explanations/. - Answer "why?" questions. Discuss trade-offs, alternatives, and rationale.
- Do not write step-by-step procedures or reference material.
- Register in
sidebars.jsunder theexplanationscategory.
- Create a new
.mdfile indocs/reference/. - Be accurate and complete. Describe what exists, not how to use it.
- Prefer generation from source (man pages, schemas) over hand-written docs.
- Register in
sidebars.jsunder thereferencecategory.
Some files are auto-generated. Look out for comments at the top indicating they should not be edited by hand.
pushd scripts && lx check --warnings-as-errors && popdThis validates LuaCATS type annotations and code style in scripts/src/.
- Write commit messages using Conventional Commits.
For documentation changes, use the
docs:prefix (e.g.docs: add guide for multi-project workspaces). - Make changes. Follow the dimension-specific guidance above.
- Verify the build succeeds:
bun run build - Open a pull request. In the description, note which Diátaxis dimension(s) the change targets.