2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-12-14 08:19:54 +00:00

Add information about building docs (#10998)

This commit is contained in:
Oliver
2025-12-12 21:14:25 +11:00
committed by GitHub
parent 20c7a5b5b8
commit e4a6c1abfb
2 changed files with 25 additions and 1 deletions

View File

@@ -15,6 +15,18 @@ $ git clone https://github.com/inventree/inventree
$ pip install --require-hashes -r docs/requirements.txt
```
## Build Documentation
Before serving the documentation, you will need to build the documentation files:
```
invoke build-docs
```
This is required to generate the required API schema files, and must be run before the documentation can be served.
Note that this command is only required when building the documentation for the first time, or when changes have been made to the API schema.
## Serve Locally
To serve the pages locally, run the following command (from the top-level project directory):
@@ -23,6 +35,18 @@ To serve the pages locally, run the following command (from the top-level projec
$ mkdocs serve -f docs/mkdocs.yml -a localhost:8080
```
Alternatively, you can use the `invoke` command:
```
invoke dev.docs-server
```
To see all the available options:
```
invoke dev.docs-server --help
```
## Edit Documentation Files
Once the server is running, it will monitor the documentation files for any changes, and update the served pages.