Merge branch 'inventree:master' into feature/bare-metal-install-improvements

This commit is contained in:
Mitch Davis 2025-12-21 18:59:41 +11:00 committed by GitHub
commit 9878f128e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 31 additions and 40 deletions

View File

@ -38,19 +38,13 @@ $ cd src
$ pip install --require-hashes -r docs/requirements.txt
```
## Build Documentation
## Schema generation
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:
```
invoke build-docs
```
Building the documentation requires extracting the API schema from the source code.
!!! tip
This command is only required when building the documentation for the first time, or when changes have been made to the API schema.
## Serve Local files
```
$ invoke build-docs
```
@ -71,41 +65,31 @@ Schema export completed: /home/inventree/src/docs/generated/schema.yml
Documentation build complete, but mkdocs not requested
```
If that worked, you can now generate the HTML format documentation pages:
## Viewing the documentation
Generate the HTML files from the markdown source files, and start the MkDocs webpage server:
```
$ mkdocs build -f docs/mkdocs.yml
```
## Viewing the generated output
To view the documentation locally, run the following command to start the MkDocs webpage server:
```
$ 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
$ mkdocs serve -f docs/mkdocs.yml
```
You can then point your web browser at http://localhost:8080/
Alternatively, you can use the `invoke` command:
```
$ invoke dev.docs-server
```
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.
## Editing the Documentation Files
Once the server is running, it will monitor the documentation files for any changes, and regenerate the HTML pages.
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.
### Admonitions
"Admonition" blocks can be added as follow:
"Admonition" blocks can be added to the documentation source as follows:
```
!!! info "This is the admonition block title"
This is the admonition block content

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@ -65,8 +65,16 @@ Admin users can install plugins directly from the web interface, via the "Plugin
{{ image("plugin/plugin_install_web.png", "Install plugin via web interface") }}
Enter the package name into the form as shown below. You can add a path and a version. Leave
the version field empty for the latest version. In case the package is on pypi the path can
be omitted. Pip will find it automatically.
{{ image("plugin/plugin_install_git.png", "Install plugin from git") }}
!!! success "Plugin File"
A plugin installed via the web interface is added to the [plugins.txt](#plugin-installation-file-pip) plugin file.
A plugin installed via the web interface is added to the [plugins.txt](#plugin-installation-file-pip) plugin file as shown below.
{{ image("plugin/plugin_install_txt.png", "Plugin.txt file") }}
#### Local Directory

View File

@ -46,6 +46,12 @@ debug_shell: False
# Set the admin URL, or use the environment variable INVENTREE_ADMIN_URL
#admin_url: 'admin'
# Add new user on first startup by either adding values here or from a file
#admin_user: admin
#admin_email: info@example.com
#admin_password: inventree
#admin_password_file: '/etc/inventree/admin_password.txt'
# Configure the system logging level (or use environment variable INVENTREE_LOG_LEVEL)
# Options: DEBUG / INFO / WARNING / ERROR / CRITICAL
log_level: WARNING
@ -69,13 +75,6 @@ language: en-us
# System time-zone (default is UTC). Reference: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
timezone: UTC
# Add new user on first startup by either adding values here or from a file
#admin_user: admin
#admin_email: info@example.com
#admin_password: inventree
#admin_password_file: '/etc/inventree/admin_password.txt'
# Email backend configuration
# See https://docs.inventree.org/en/stable/settings/email for more information on email configuration
# You can either use (1) SMTP, (2) console or (3) anymail backends