Skip to content

Commit 36cfd2c

Browse files
authored
Improvements to the documentation instructions (inventree#11044)
1 parent a2676fe commit 36cfd2c

1 file changed

Lines changed: 11 additions & 27 deletions

File tree

docs/README.md

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,13 @@ $ cd src
3838
$ pip install --require-hashes -r docs/requirements.txt
3939
```
4040

41-
## Build Documentation
41+
## Schema generation
4242

43-
Before serving the documentation, you will need to build the API schema files from the source code, so they can be included in the documentation:
44-
45-
```
46-
invoke build-docs
47-
```
43+
Building the documentation requires extracting the API schema from the source code.
4844

4945
!!! tip
5046
This command is only required when building the documentation for the first time, or when changes have been made to the API schema.
5147

52-
## Serve Local files
53-
5448
```
5549
$ invoke build-docs
5650
```
@@ -71,41 +65,31 @@ Schema export completed: /home/inventree/src/docs/generated/schema.yml
7165
Documentation build complete, but mkdocs not requested
7266
```
7367

74-
If that worked, you can now generate the HTML format documentation pages:
75-
76-
```
77-
$ mkdocs build -f docs/mkdocs.yml
78-
```
79-
80-
## Viewing the generated output
68+
## Viewing the documentation
8169

82-
To view the documentation locally, run the following command to start the MkDocs webpage server:
70+
Generate the HTML files from the markdown source files, and start the MkDocs webpage server:
8371

8472
```
85-
$ mkdocs serve -f docs/mkdocs.yml -a localhost:8080
73+
$ mkdocs serve -f docs/mkdocs.yml
8674
```
8775

88-
Alternatively, you can use the `invoke` command:
89-
90-
```
91-
invoke dev.docs-server
92-
```
76+
You can then point your web browser at http://localhost:8080/
9377

94-
To see all the available options:
78+
Alternatively, you can use the `invoke` command:
9579

9680
```
97-
invoke dev.docs-server --help
81+
$ invoke dev.docs-server
9882
```
9983

100-
You can then point your web browser at http://localhost:8080/
84+
If you need to, use the `-a` option after `mkdocs` or `invoke` to set the address and port. Run `invoke dev.docs-server --help` for details.
10185

10286
## Editing the Documentation Files
10387

104-
Once the server is running, it will monitor the documentation files for any changes, and regenerate the HTML pages.
88+
Once the server is running, it will monitor the documentation files for changes, and regenerate the HTML pages as required. Refresh your web browser to see the changes.
10589

10690
### Admonitions
10791

108-
"Admonition" blocks can be added as follow:
92+
"Admonition" blocks can be added to the documentation source as follows:
10993
```
11094
!!! info "This is the admonition block title"
11195
This is the admonition block content

0 commit comments

Comments
 (0)