InvenTree/docs
Matthias Mair 10c3d101e8
Replace mklint with djlint (#4746)
* remove markuplint

* remove dedicated html step - will be done by pre-commit

* add djlint for django template linting

* Fix T003: Endblock should have name

* Fix H013: Img tag should have an alt attribute

* Fix H014: Found extra blank lines

* Fix T003: Endblock should have name

* Fix H013: Img tag should have an alt attribute

* small fixes

* Fix T001: Variables should be wrapped in a single whitespace

* Fix T003: Endblock should have name

* small fixes

* fix form method

* add entry to contributing

* fix template changes

* another fix

* use current version
2023-05-02 20:03:52 +10:00
..
_includes Replace mklint with djlint (#4746) 2023-05-02 20:03:52 +10:00
ci Documentation integration (#4653) 2023-04-22 22:40:29 +10:00
docs Update README.md with digitalocean info (#4742) 2023-05-01 19:42:14 +02:00
__init__.py Fixes for docs building (#4659) 2023-04-22 23:35:25 +10:00
.gitignore Fixes for docs building (#4659) 2023-04-22 23:35:25 +10:00
LICENSE Documentation integration (#4653) 2023-04-22 22:40:29 +10:00
main.py Code style improvements (#4683) 2023-04-28 20:49:53 +10:00
mkdocs.yml Plugin metadata docs (#4724) 2023-05-01 23:33:44 +10:00
README.md Specify order currency (#4698) 2023-04-26 17:35:15 +10:00
requirements.txt Documentation integration (#4653) 2023-04-22 22:40:29 +10:00

InvenTree Documentation

Documentation Status

This repository hosts the official documentation for InvenTree, an open source inventory management system.

To serve this documentation locally (e.g. for development), you will need to have Python 3 installed on your system.

Setup

Run the following commands from the top-level project directory:

$ git clone https://github.com/inventree/inventree
$ cd inventree/docs
$ pip install -r requirements.txt

Serve Locally

To serve the pages locally, run the following command (from the top-level project directory):

$ mkdocs serve -f docs/mkdocs.yml -a localhost:8080

Edit Documentation Files

Once the server is running, it will monitor the documentation files for any changes, and update the served pages.

Admonitions

"Admonition" blocks can be added as follow:

!!! info "This is the admonition block title"
    This is the admonition block content

Refer to the reference documentation to customize the admonition block to the use-case (eg. warning, missing, info, etc.).

Links to internal documentation pages must use relative pathing, otherwise the link will be broken by the readthedocs URL formatting.

Also, linking to an internal page must use the .md suffix!

For example, to link to the page /part/views from /stock/stocktake, the link must be formed as follows:

Click [here](../part/views.md)

Formatting the link as follows:

Click [here](/part/views)

will result in a broken link.

Images

Images are served from the ./docs/assets/images folder and can be added as follow:

{% with id="image_id", url="folder/image_name.png", description="Text shown if image is not loaded properly" %}
{% include 'img.html' %}
{% endwith %}

Replace:

  • image_id with a short unique indentifier for the image (most commonly, image_id is same as image_name)
  • folder with the folder in docs/assets/images in which the image is stored
  • image_name with the name of the image
  • .png with the image extension (PNG or JPEG are preferred formats)

Global variables

Refer to the reference documentation to find out how to add global variables to the documentation site.

Global variables should be added in the # Global Variables section of the mkdocs.yml configuration file.

Credits

This documentation makes use of the mkdocs-material template