2021-01-04 07:07:44 -05:00
|
|
|
# Documentation
|
|
|
|
|
2023-07-02 16:31:04 -04:00
|
|
|
Our documentation is build with [mkdocs][mkdocs]. While you can write documentation with every text
|
|
|
|
editor you like, if you want to build the documentation and want to see at how it will look you need
|
|
|
|
to have [python3][python3] and [mkdocs][mkdocs] installed.
|
2021-01-04 07:07:44 -05:00
|
|
|
|
|
|
|
## Writing
|
|
|
|
|
2023-07-08 09:39:12 -04:00
|
|
|
<!-- markdownlint-disable proper-names -->
|
2023-07-02 16:31:04 -04:00
|
|
|
All documentation files are found in the `docs/content` directory of
|
2023-07-08 09:39:12 -04:00
|
|
|
the [hedgedoc/hedgedoc repo](https://github.com/hedgedoc/hedgedoc). These files are just normal
|
2023-07-05 20:45:32 -04:00
|
|
|
markdown files with nothing special about them.
|
2023-07-02 16:31:04 -04:00
|
|
|
<!-- markdownlint-enable proper-names -->
|
2021-01-04 07:07:44 -05:00
|
|
|
|
2023-07-05 20:45:32 -04:00
|
|
|
The configuration for mkdocs lies in the `docs` folder in a file called `mkdocs.yml`. With that file
|
|
|
|
the theme and menu - among others - can be configured.
|
|
|
|
**Please note:** Any new files need to be linked to by other files or put in the navigation,
|
|
|
|
otherwise the files will be very hard to find on the documentation website.
|
2021-01-04 07:07:44 -05:00
|
|
|
|
|
|
|
## Building
|
|
|
|
|
|
|
|
To build the documentation locally you need to perform the following steps:
|
|
|
|
|
2023-07-02 16:31:04 -04:00
|
|
|
1. Make sure you have [python3][python3] installed. `python3 --version`
|
2023-07-05 20:45:32 -04:00
|
|
|
2. Go into the `docs` folder.
|
|
|
|
3. Install all the dependencies (E.g. with a [venv](https://docs.python.org/3/library/venv.html))
|
2021-01-04 07:07:44 -05:00
|
|
|
with `pip install -r requirements.txt`
|
2023-07-05 20:45:32 -04:00
|
|
|
4. Start the mkdocs dev server (`mkdocs serve`) or build the documentation (`mkdocs build`).
|
2021-01-04 07:07:44 -05:00
|
|
|
|
2023-07-02 16:31:04 -04:00
|
|
|
If you run `mkdcs serve` a local server will serve the mkdocs files and change the served files as
|
|
|
|
you write documentation.
|
|
|
|
|
2021-01-04 07:07:44 -05:00
|
|
|
## Deployment
|
|
|
|
|
2021-03-20 08:18:06 -04:00
|
|
|
The documentation is deployed with [mkdocs][mkdocs].
|
2021-01-04 07:07:44 -05:00
|
|
|
|
2023-07-08 09:39:12 -04:00
|
|
|
<!-- markdownlint-disable proper-names -->
|
|
|
|
The repository [docs.hedgedoc.org][docs.hedgedoc.org] is used to deploy the actual website
|
2023-07-05 20:45:32 -04:00
|
|
|
to github.io. Currently only the `master` branch is deployed as it contains the latest release.
|
2023-07-02 16:31:04 -04:00
|
|
|
<!-- markdownlint-enable proper-names -->
|
2021-01-04 07:07:44 -05:00
|
|
|
|
2021-04-25 14:57:13 -04:00
|
|
|
[mkdocs]: https://www.mkdocs.org
|
2023-07-02 16:31:04 -04:00
|
|
|
[python3]: https://www.python.org/
|
2023-07-08 09:39:12 -04:00
|
|
|
[docs.hedgedoc.org]: https://github.com/hedgedoc/docs.hedgedoc.org
|