[docs] Zensical docs (#13253)

* add zensical workflow

* rebuild schema dynamically

* load in new module

* Use zensical for docs invoke tasks

* modern

* improved carousel layout

* Increased content width

* fix for app icons

* Ensure schema dir exists

* remove unused requirement

* update readthedocs process

* fix polar.sh link

* adjust link checker pattern

* Revert some of the original style

* remove legacy mkdocs requirements

* fix for ready.py

* reduce db warnings during schema generation

* Adjust padding

* fix index issues

* fix page title

* fix pages with broken or missing headers

* split data import API schema

* cleanup old carousel

* remove djlint link
This commit is contained in:
Oliver authored and GitHub committed 2026-11-14 22:34:18 +11:00
1 parent 80ad822688
commit 19dfb81bfb
52 files changed
+1272 -4885

No files matched your search

+4
View File
@@ -20,3 +20,7 @@ To export API data to a file, add the `&export=<format>` modifier to the query.
Any other query filters used in the API request are also observed when downloading the data. For example, to download a list of all stock items in a given location:
`<host>/api/stock/?format=csv&location=10`
### Further Information
For further information, refer to the [data export documentation](../concepts/data_export.md).
+3 -1
View File
@@ -2,12 +2,14 @@
title: InvenTree API Schema
---
## InvenTree API Schema
The InvenTree API is implemented using the [Django REST framework](https://www.django-rest-framework.org).
The API schema as documented below is generated using the [drf-spectactular](https://github.com/tfranzel/drf-spectacular/) extension.
## API Version
This documentation is for API version: `568`
This documentation is for API version: `578`
!!! tip "API Schema History"
We track API schema changes, and provide a snapshot of each API schema version in the [API schema repository](https://github.com/inventree/schema/).
-7
View File
@@ -1,7 +0,0 @@
---
title: Authorization and Authentication
---
The *Authorization and Authentication* section of the InvenTree API schema is documented below.
[OAD(./docs/docs/api/schema/auth.yml)]
-7
View File
@@ -1,7 +0,0 @@
---
title: Background Task Management
---
The *Background Task Management* section of the InvenTree API schema is documented below.
[OAD(./docs/docs/api/schema/background-task.yml)]
-7
View File
@@ -1,7 +0,0 @@
---
title: Barcode Scanning
---
The *Barcode Scanning* section of the InvenTree API schema is documented below.
[OAD(./docs/docs/api/schema/barcode.yml)]
-7
View File
@@ -1,7 +0,0 @@
---
title: Bill of Materials
---
The *Bill of Materials* section of the InvenTree API schema is documented below.
[OAD(./docs/docs/api/schema/bom.yml)]
-7
View File
@@ -1,7 +0,0 @@
---
title: Build Order Management
---
The *Build Order Management* section of the InvenTree API schema is documented below.
[OAD(./docs/docs/api/schema/build.yml)]
-7
View File
@@ -1,7 +0,0 @@
---
title: Company Management
---
The *Company Management* section of the InvenTree API schema is documented below.
[OAD(./docs/docs/api/schema/company.yml)]
-7
View File
@@ -1,7 +0,0 @@
---
title: General API Endpoints
---
The *General API Endpoints* section of the InvenTree API schema is documented below.
[OAD(./docs/docs/api/schema/general.yml)]
-7
View File
@@ -1,7 +0,0 @@
---
title: Label Printing
---
The *Label Printing* section of the InvenTree API schema is documented below.
[OAD(./docs/docs/api/schema/label.yml)]
-7
View File
@@ -1,7 +0,0 @@
---
title: External Machine Management
---
The *External Machine Management* section of the InvenTree API schema is documented below.
[OAD(./docs/docs/api/schema/machine.yml)]
-7
View File
@@ -1,7 +0,0 @@
---
title: External Order Management
---
The *External Order Management* section of the InvenTree API schema is documented below.
[OAD(./docs/docs/api/schema/order.yml)]
-7
View File
@@ -1,7 +0,0 @@
---
title: Parts and Part Categories
---
The *Parts and Part Categories* section of the InvenTree API schema is documented below.
[OAD(./docs/docs/api/schema/part.yml)]
-7
View File
@@ -1,7 +0,0 @@
---
title: Plugin Functionality
---
The *Plugin Functionality* section of the InvenTree API schema is documented below.
[OAD(./docs/docs/api/schema/plugins.yml)]
-7
View File
@@ -1,7 +0,0 @@
---
title: Part Pricing
---
The *Part Pricing* section of the InvenTree API schema is documented below.
[OAD(./docs/docs/api/schema/pricing.yml)]
-7
View File
@@ -1,7 +0,0 @@
---
title: Report Generation
---
The *Report Generation* section of the InvenTree API schema is documented below.
[OAD(./docs/docs/api/schema/report.yml)]
-7
View File
@@ -1,7 +0,0 @@
---
title: Settings Management
---
The *Settings Management* section of the InvenTree API schema is documented below.
[OAD(./docs/docs/api/schema/settings.yml)]
-7
View File
@@ -1,7 +0,0 @@
---
title: Stock and Stock Locations
---
The *Stock and Stock Locations* section of the InvenTree API schema is documented below.
[OAD(./docs/docs/api/schema/stock.yml)]
-7
View File
@@ -1,7 +0,0 @@
---
title: User Management
---
The *User Management* section of the InvenTree API schema is documented below.
[OAD(./docs/docs/api/schema/user.yml)]
+8 -4
View File
@@ -2,14 +2,16 @@
title: InvenTree Mobile App
---
{% with directory="appgallery", per_page=2 %}
## InvenTree Mobile App
The InvenTree Mobile App brings stock control to your pocket. Integrating seamlessly with the [InvenTree API](../api/index.md), the app provides immediate access to inventory data without requiring physical access to a computer.
{% with directory="appgallery", per_page=2, height="25rem", mobile_height="25rem" %}
{% include "carousel.html" %}
{% endwith %}
-----
The InvenTree Mobile App brings stock control to your pocket. Integrating seamlessly with the [InvenTree API](../api/index.md), the app provides immediate access to inventory data without requiring physical access to a computer.
Native barcode support provides a multitude of context-sensitive stock control actions, allowing streamlined inventory management at your fingertips. The app has been optimized for speed, providing instant access to stock knowledge and handy on-site functionality.
## Features
@@ -29,7 +31,9 @@ The InvenTree app can be downloaded from either the Android or Apple app stores,
<span class='fab fa-android'></span> [Android Play Store](https://play.google.com/store/apps/details?id=inventree.inventree_app).
!!! info "APK Download"
As an alternative to using the Android Play Store, the InvenTree app APK file can be downloaded directly via our [polar.sh](https://polar.sh/inventree/products/299bf0d5-af88-4e0f-becf-c007ad37ecf2) page.
As an alternative to using the Android Play Store, the InvenTree app APK file can be downloaded directly via our [polar.sh](https://buy.polar.sh/polar_cl_UnGILJ0c7P3hQrOrJs127oyLTTDOTHKrnqfCg30XtBI) page.
### iOS
-1
View File
@@ -2,7 +2,6 @@
title: Companies
---
## Companies
External companies are represented by the *Company* database model. Each company may be classified into the following categories:
+3 -3
View File
@@ -3,9 +3,9 @@ title: Contribution Guide
---
Please read the contribution guidelines below, before submitting your first pull request to the InvenTree codebase.
## Contribution Guide
## Quickstart
Please read the contribution guidelines below, before submitting your first pull request to the InvenTree codebase.
The following commands will get you quickly configure and run a development server, complete with a demo dataset to work with:
@@ -281,7 +281,7 @@ If you have followed the setup devtools procedure, then code style checking is p
Django are checked by [djlint](https://github.com/Riverside-Healthcare/djlint) through pre-commit.
The following rules out of the [default set](https://djlint.com/docs/linter/) are not applied:
The following rules out of the default set of djlint rules are not applied:
```bash
D018: (Django) Internal links should use the { % url ... % } pattern
H006: Img tag should have height and width attributes
+1 -1
View File
@@ -2,7 +2,7 @@
title: React Frontend Development
---
## Setup
## React Frontend Development
The following documentation details how to setup and run a development installation of the InvenTree frontend user interface. It is assumed that you are using the [InvenTree devcontainer setup](./devcontainer.md).
-14
View File
@@ -6,16 +6,6 @@ title: High level roadmap
## High level Epics
### 1.0
Smaller items can be viewed [on the milestone](https://github.com/inventree/InvenTree/issues?q=is%3Aissue%20milestone%3A1.0.0).
Aiming to stabelise several aspects of the software:
- Only shipping the new frontend and removing reliance on templating
- Stabelize API for client generation
- Making data import- / export-mechanisms more stable
- Updating and Re-Organising documentation to enable CII best practices compliance
### 2.0
@@ -29,7 +19,3 @@ Smaller items can be viewed [on the milestone](https://github.com/inventree/Inve
### Future
There are several epics that target [the horizion](https://github.com/inventree/InvenTree/issues?q=is%3Aissue%20state%3Aopen%20type%3AEpic).
## Non-Goals
TBD
+6 -1
View File
@@ -1,4 +1,9 @@
"""Custom mkdocs hooks, using the mkdocs-simple-hooks plugin."""
"""Documentation build hooks.
Zensical does not run mkdocs hooks, so these are called directly:
- on_config: via docs/docs_data.py (hook_config)
- on_post_build: via the "invoke build-docs --build" task
"""
import json
import os
File diff suppressed because it is too large. Load diff
+2
View File
@@ -1,4 +1,6 @@
## InvenTree Project Governance
As a MIT licensed open-source project, there are not legal obligations for the InvenTree project team or any contributor to provide support or maintenance. The software is provided "as-is" - without warranty of any kind.
However, the project team is committed to providing a reliable and [secure](../security.md) code base with predictable upgrade paths.
+2
View File
@@ -2,6 +2,8 @@
title: Sponsored Resources
---
## Sponsored Resources
The InvenTree project is grateful to receive resources from various vendors free of charge.
Individuals and companies can also support via [GitHub sponsors](https://github.com/sponsors/inventree).
+2
View File
@@ -2,6 +2,8 @@
title: Helper Functions
---
## Report Helper Functions
Some common functions are provided for use in custom report and label templates. To include these, load the `report` functions at the start of the template:
```html
-1
View File
@@ -1,4 +1,3 @@
---
title: Sales Orders
---
+1
View File
@@ -1,3 +1,4 @@
## InvenTree Security Overview
The InvenTree project is committed to providing a secure and safe environment for all users. We know that many of our users rely on InvenTree to manage the inventory and manufacturing for their small and mid-size businesses, and we take that responsibility seriously.
-16
View File
@@ -1,16 +0,0 @@
---
title: Experimental Features
---
## Feature Flags
InvenTree ships with django-flags and enables path (parameter), user, session, date or settings based feature flags. This allows admins to slowly test and roll out new features on their instance without running parallel instances.
Additional flags can be provided via the the `INVENTREE_FLAGS` environment key (see [configuration](../start/config.md#environment-variables)).
Superusers can configure run-time conditions [as per django-flags](https://cfpb.github.io/django-flags/conditions/) docs under `/admin/flags/flagstate/`.
## Current Experimental Features
| Feature | Key | Description |
| --- | --- | --- |
-1
View File
@@ -1,4 +1,3 @@
---
title: Transfer Orders
---
+92 -3
View File
@@ -68,12 +68,20 @@ p {
text-align: justify;
}
div:nth-of-type(1) p {
div:nth-of-type(1) p:not(.admonition-title) {
padding-top: 12px;
}
/* Remove page title */
.md-content h1:first-child {
/* Use the theme code font (bootstrap.css otherwise overrides it) */
.md-typeset code,
.md-typeset kbd,
.md-typeset pre {
font-family: var(--md-code-font-family);
}
/* Remove page title (Zensical inserts a skip-link anchor before the h1) */
.md-content h1:first-child,
.md-content #__skip + h1 {
display: none;
}
@@ -154,3 +162,84 @@ div:nth-of-type(1) p {
background-color: #5bc0de;
color: #555;
}
/* HTTP method badges for the generated API schema documentation */
.api-method {
display: inline-block;
min-width: 4.2em;
padding: 0.1em 0.5em;
border-radius: 0.2rem;
color: #fff;
font-family: var(--md-code-font-family);
font-size: 0.75em;
font-weight: 700;
text-align: center;
vertical-align: middle;
}
.api-method-get { background-color: #2b8a3e; }
.api-method-post { background-color: #1971c2; }
.api-method-put { background-color: #e67700; }
.api-method-patch { background-color: #9c36b5; }
.api-method-delete { background-color: #c92a2a; }
.api-method-head, .api-method-options { background-color: #495057; }
/* Image carousel: scale every image to the slide height, keeping aspect ratio */
.splide__slide {
display: flex;
align-items: center;
justify-content: center;
}
.splide__slide img {
height: 100%;
width: auto;
/* Very wide images shrink to fit the carousel on narrow screens */
max-width: calc(100vw - 2rem);
object-fit: contain;
}
/* Widen the page layout (theme default is 61rem), and keep ~5% horizontal
* padding so the content does not run to the window edges */
.md-grid {
max-width: 80rem;
padding-left: 5%;
padding-right: 5%;
}
/* ...but not for grids nested inside page content (e.g. the home page hero) */
.md-content .md-grid {
padding-left: 0;
padding-right: 0;
}
/* Solid primary-colour header and navigation tabs, as in the classic theme.
* (The Zensical "modern" variant uses a translucent neutral header.) */
.md-header,
.md-tabs {
background-color: var(--md-primary-fg-color);
color: var(--md-primary-bg-color);
}
.md-header {
backdrop-filter: none;
}
/* Search button on the coloured header (darker blue box, white text) */
.md-header .md-search__button {
background-color: rgba(0, 0, 0, 0.26);
color: var(--md-primary-bg-color);
}
.md-header .md-search__button:hover {
background-color: rgba(0, 0, 0, 0.32);
}
.md-header .md-search__button::before {
background-color: var(--md-primary-bg-color);
}
.md-header .md-search__button::after {
background-color: rgba(0, 0, 0, 0.2);
color: var(--md-primary-bg-color);
}
@@ -0,0 +1,8 @@
/*!
* Font Awesome Free 5.13.0 - SVG with JS stylesheet (https://fontawesome.com)
* License - https://fontawesome.com/license/free (Code: MIT License)
*
* fontawesome.js normally injects this into <head> at runtime, but with
* navigation.instant the head is replaced on page change and it is lost.
*/
svg:not(:root).svg-inline--fa{overflow:visible}.svg-inline--fa{display:inline-block;font-size:inherit;height:1em;overflow:visible;vertical-align:-.125em}.svg-inline--fa.fa-lg{vertical-align:-.225em}.svg-inline--fa.fa-w-1{width:.0625em}.svg-inline--fa.fa-w-2{width:.125em}.svg-inline--fa.fa-w-3{width:.1875em}.svg-inline--fa.fa-w-4{width:.25em}.svg-inline--fa.fa-w-5{width:.3125em}.svg-inline--fa.fa-w-6{width:.375em}.svg-inline--fa.fa-w-7{width:.4375em}.svg-inline--fa.fa-w-8{width:.5em}.svg-inline--fa.fa-w-9{width:.5625em}.svg-inline--fa.fa-w-10{width:.625em}.svg-inline--fa.fa-w-11{width:.6875em}.svg-inline--fa.fa-w-12{width:.75em}.svg-inline--fa.fa-w-13{width:.8125em}.svg-inline--fa.fa-w-14{width:.875em}.svg-inline--fa.fa-w-15{width:.9375em}.svg-inline--fa.fa-w-16{width:1em}.svg-inline--fa.fa-w-17{width:1.0625em}.svg-inline--fa.fa-w-18{width:1.125em}.svg-inline--fa.fa-w-19{width:1.1875em}.svg-inline--fa.fa-w-20{width:1.25em}.svg-inline--fa.fa-pull-left{margin-right:.3em;width:auto}.svg-inline--fa.fa-pull-right{margin-left:.3em;width:auto}.svg-inline--fa.fa-border{height:1.5em}.svg-inline--fa.fa-li{width:2em}.svg-inline--fa.fa-fw{width:1.25em}.fa-layers svg.svg-inline--fa{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.fa-layers{display:inline-block;height:1em;position:relative;text-align:center;vertical-align:-.125em;width:1em}.fa-layers svg.svg-inline--fa{-webkit-transform-origin:center center;transform-origin:center center}.fa-layers-counter,.fa-layers-text{display:inline-block;position:absolute;text-align:center}.fa-layers-text{left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);-webkit-transform-origin:center center;transform-origin:center center}.fa-layers-counter{background-color:#ff253a;border-radius:1em;-webkit-box-sizing:border-box;box-sizing:border-box;color:#fff;height:1.5em;line-height:1;max-width:5em;min-width:1.5em;overflow:hidden;padding:.25em;right:0;text-overflow:ellipsis;top:0;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:top right;transform-origin:top right}.fa-layers-bottom-right{bottom:0;right:0;top:auto;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:bottom right;transform-origin:bottom right}.fa-layers-bottom-left{bottom:0;left:0;right:auto;top:auto;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:bottom left;transform-origin:bottom left}.fa-layers-top-right{right:0;top:0;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:top right;transform-origin:top right}.fa-layers-top-left{left:0;right:auto;top:0;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:top left;transform-origin:top left}.fa-lg{font-size:1.3333333333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:solid .08em #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.fa-rotate-90{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-webkit-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{-webkit-transform:scale(1,-1);transform:scale(1,-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{-webkit-transform:scale(-1,-1);transform:scale(-1,-1)}:root .fa-flip-both,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;position:relative;width:2.5em}.fa-stack-1x,.fa-stack-2x{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.svg-inline--fa.fa-stack-1x{height:1em;width:1.25em}.svg-inline--fa.fa-stack-2x{height:2em;width:2.5em}.fa-inverse{color:#fff}.sr-Line truncated
File diff suppressed because it is too large. Load diff