Updating documentation
To update the documentation site, you need to:
- learn markdown in y minutes
- create a github account as the source code for docs site is hosted on github.
Browser
- Click the
Suggest an editpencil icon at the top right of the page.
- You will be redirected to the github page of the documentation site. You can edit and preview your changes here.
Note
.mdinCONTRIBUTING.mdstands for markdown files.
- Click the
Commit changes...button on the top right corner to commit your changes. Make sure to
- Write a short and descriptive
Commit message - Check the
Create a new branch for this commit and start a pull requestcheckbox.
- You will be redirected to the
Comparing changespage. Click theCreate pull requestbutton to create a pull request.
- Click the
Create pull requestbutton to open a PR. It’s okay to leave the PR body empty for small changes.
Local development
Note
This section assumes you have some knowledge of git. You can learn it as you go.
To run the documentation site locally, install mdBook.
Setup dev server
(Cataclysm-BN) $ just docs
Open http://localhost:3000. The page reloads when you save a file.
Add a page
Add each new page to docs/en/SUMMARY.md. The sidebar shows only the pages listed there.
Automated page generation
Lua and CLI docs are generated automatically from the source code. To generate them, go to project root and run:
(Cataclysm-BN) $ deno task docs:gen
This regenerates docs/en/mod/lua/reference/lua.md and lua_annotations.lua (used for Lua IDE autocompletion).
License
-
By contributing to markdown files (including, but not limited to
.mdfiles), you agree to license your contributions under CC-BY-SA 3.0, the same license as the game. -
By contributing to source code of documentation page (including, but not limited to
.jsand.tomlfiles), you agree to license your contributions under AGPL 3.0.