2021-01-04 12:07:44 +00:00
|
|
|
# Documentation
|
|
|
|
|
2023-07-02 20:31:04 +00: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 12:07:44 +00:00
|
|
|
|
|
|
|
## Writing
|
|
|
|
|
2023-07-08 13:39:12 +00:00
|
|
|
<!-- markdownlint-disable proper-names -->
|
2023-07-02 20:31:04 +00:00
|
|
|
All documentation files are found in the `docs/content` directory of
|
2023-07-08 13:39:12 +00:00
|
|
|
the [hedgedoc/hedgedoc repo](https://github.com/hedgedoc/hedgedoc). These files are just normal
|
2023-07-06 00:45:32 +00:00
|
|
|
markdown files with nothing special about them.
|
2023-07-02 20:31:04 +00:00
|
|
|
<!-- markdownlint-enable proper-names -->
|
2021-01-04 12:07:44 +00:00
|
|
|
|
2023-07-06 00:45:32 +00: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 12:07:44 +00:00
|
|
|
|
|
|
|
## Building
|
|
|
|
|
|
|
|
To build the documentation locally you need to perform the following steps:
|
|
|
|
|
2023-07-02 20:31:04 +00:00
|
|
|
1. Make sure you have [python3][python3] installed. `python3 --version`
|
2023-07-06 00:45:32 +00: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 12:07:44 +00:00
|
|
|
with `pip install -r requirements.txt`
|
2023-07-06 00:45:32 +00:00
|
|
|
4. Start the mkdocs dev server (`mkdocs serve`) or build the documentation (`mkdocs build`).
|
2021-01-04 12:07:44 +00:00
|
|
|
|
2023-07-02 20:31:04 +00: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 12:07:44 +00:00
|
|
|
## Deployment
|
|
|
|
|
2021-03-20 12:18:06 +00:00
|
|
|
The documentation is deployed with [mkdocs][mkdocs].
|
2021-01-04 12:07:44 +00:00
|
|
|
|
2023-07-08 13:39:12 +00:00
|
|
|
<!-- markdownlint-disable proper-names -->
|
|
|
|
The repository [docs.hedgedoc.org][docs.hedgedoc.org] is used to deploy the actual website
|
2023-07-06 00:45:32 +00:00
|
|
|
to github.io. Currently only the `master` branch is deployed as it contains the latest release.
|
2023-07-02 20:31:04 +00:00
|
|
|
<!-- markdownlint-enable proper-names -->
|
2021-01-04 12:07:44 +00:00
|
|
|
|
2021-04-25 18:57:13 +00:00
|
|
|
[mkdocs]: https://www.mkdocs.org
|
2023-07-02 20:31:04 +00:00
|
|
|
[python3]: https://www.python.org/
|
2023-07-08 13:39:12 +00:00
|
|
|
[docs.hedgedoc.org]: https://github.com/hedgedoc/docs.hedgedoc.org
|