| 1 | # Documentation |
| 2 | |
| 3 | ## When should documentation changes be done? |
| 4 | |
| 5 | - Whenever a new feature is added, a bug is fixed, or a breaking change is made, it should be documented where |
| 6 | appropriate (ex: `README.md`, changelog, etc.) |
| 7 | - New methods of installation are always appreciated and should be documented |
| 8 | |
| 9 | ## What pages need documentation? |
| 10 | |
| 11 | There are a few areas where documentation changes are often needed: |
| 12 | |
| 13 | - The [`README.md`](https://github.com/ClementTsang/bottom/blob/main/README.md) |
| 14 | - The help menu inside of the application (located [here](https://github.com/ClementTsang/bottom/blob/main/src/constants.rs)) |
| 15 | - The [extended documentation](../index.md) (what you're reading right now) |
| 16 | - The [`CHANGELOG.md`](https://github.com/ClementTsang/bottom/blob/main/CHANGELOG.md) |
| 17 | |
| 18 | ## How should I add/update documentation? |
| 19 | |
| 20 | 1. Fork the repository to make changes in. |
| 21 | |
| 22 | 2. Where you're adding documentation will probably affect what you need to do: |
| 23 | |
| 24 | <h3><code>README.md</code> or <code>CHANGELOG.md</code></h3> |
| 25 | |
| 26 | For changes to [`README.md`](https://github.com/ClementTsang/bottom/blob/main/README.md) and [`CHANGELOG.md`](https://github.com/ClementTsang/bottom/blob/main/CHANGELOG.md), just follow the formatting provided and use any editor. |
| 27 | |
| 28 | Generally, changes to [`CHANGELOG.md`](https://github.com/ClementTsang/bottom/blob/main/CHANGELOG.md) will be handled |
| 29 | by a maintainer, and the contents of the file should follow the [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) |
| 30 | format, as well as link to the relevant PR or issues. |
| 31 | |
| 32 | <h3>Help menu</h3> |
| 33 | |
| 34 | For changes to the help menu, try to refer to the existing code within [`src/constants.rs`](https://github.com/ClementTsang/bottom/blob/main/src/constants.rs) on how the help menu is generated. |
| 35 | |
| 36 | <h3>Extended documentation</h3> |
| 37 | |
| 38 | For changes to the extended documentation, you'll probably want at least Python 3.11 (older and newer versions |
| 39 | should be fine), [MkDocs](https://www.mkdocs.org/), [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/), |
| 40 | `mdx_truly_sane_lists`, and optionally [Mike](https://github.com/jimporter/mike) installed. These can help with |
| 41 | validating your changes locally. |
| 42 | |
| 43 | You can do so through `pip` or your system's package managers. If you use `pip`, you can use venv to cleanly install |
| 44 | the documentation dependencies: |
| 45 | |
| 46 | ```bash |
| 47 | # Change directories to the documentation. |
| 48 | cd docs/ |
| 49 | |
| 50 | # Create venv, install the dependencies, and serve the page. |
| 51 | ./serve.sh |
| 52 | ``` |
| 53 | |
| 54 | This will serve a local version of the docs that you can open on your browser. It will update as you make changes. |
| 55 | |
| 56 | 3. Once you have your documentation changes done, submit it as a pull request. For more information regarding that, |
| 57 | refer to [Issues, Pull Requests, and Discussions](issues-and-pull-requests.md). |
| 58 | |
| 59 | ## AI Policy |
| 60 | |
| 61 | Documentation should _never_ be generated by AI. The point of documentation in this project is to communicate things between humans. Follow the [AI policy](https://github.com/ClementTsang/bottom/blob/main/AI_POLICY.md); changes that do not follow it |
| 62 | may be closed or hidden. |