mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-12 10:05:39 +00:00
Documentation integration (#4653)
* Add documentation under docs/ directory * Add CI workflow for mkdocs configuration checking * Add documentation issue template * update pip-tools? * Update .gitignore files * Fix .gitignore rules * Improve release notes page * remove references to old repo
This commit is contained in:
5
docs/_includes/app_img.html
Normal file
5
docs/_includes/app_img.html
Normal file
@ -0,0 +1,5 @@
|
||||
{% set url = 'app/' + url %}
|
||||
|
||||
{% with id=id, url=url, maxheight="240px", description="" %}
|
||||
{% include "img.html" %}
|
||||
{% endwith %}
|
32
docs/_includes/carousel.html
Normal file
32
docs/_includes/carousel.html
Normal file
@ -0,0 +1,32 @@
|
||||
<div class='splide'>
|
||||
<div class='splide__track'>
|
||||
<ul class='splide__list'>
|
||||
{% for img in listimages(directory) %}
|
||||
{% with src=img %}
|
||||
{% include "splide_image.html" %}
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.addEventListener( 'DOMContentLoaded', function () {
|
||||
new Splide(
|
||||
'.splide', {
|
||||
type: 'loop',
|
||||
perPage: {{ per_page }},
|
||||
autoplay: true,
|
||||
pagination: false,
|
||||
// cover: true,
|
||||
// autoWidth: true,
|
||||
height: '25rem',
|
||||
focus: 'center',
|
||||
padding: {
|
||||
left: '5rem',
|
||||
right: '5rem',
|
||||
}
|
||||
}
|
||||
).mount();
|
||||
} );
|
||||
</script>
|
5
docs/_includes/gunicorn.conf.py
Normal file
5
docs/_includes/gunicorn.conf.py
Normal file
@ -0,0 +1,5 @@
|
||||
import multiprocessing
|
||||
|
||||
bind = "0.0.0.0:8000"
|
||||
|
||||
workers = multiprocessing.cpu_count() * 2 + 1
|
30
docs/_includes/img.html
Normal file
30
docs/_includes/img.html
Normal file
@ -0,0 +1,30 @@
|
||||
{% if 'http' in url %}
|
||||
{% set img_url = url %}
|
||||
{% else %}
|
||||
{% set img_url = config.assets_dir + '/images/' + url %}
|
||||
{% endif %}
|
||||
|
||||
<figure class='image image-inventree'>
|
||||
{% if id %}
|
||||
<!-- The link that, when clicked, will display the image in full screen -->
|
||||
<a href="#{{ id }}">
|
||||
{% elif img_url %}
|
||||
<a href="{{ img_url }}">
|
||||
{% endif %}
|
||||
<img class='img-inline' src='{{ img_url }}' alt='{{ description }}' title='{{ description }}'
|
||||
{% if maxwidth or maxheight %}style='
|
||||
{% if maxwidth %} max-width:{{ maxwidth }};{% endif %}
|
||||
{% if maxheight %} max-height: {{ maxheight }};{% endif %}
|
||||
'{% endif %}
|
||||
>
|
||||
{% if id or img_url %}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if id %}
|
||||
<!-- The full screen image, hidden by default -->
|
||||
<a href="#_" class="overlay" id="{{ id }}">
|
||||
<img src="{{ img_url }}" alt="{{ description }}" />
|
||||
</a>
|
||||
{% endif %}
|
||||
</figure>
|
29
docs/_includes/overrides/404.html
Normal file
29
docs/_includes/overrides/404.html
Normal file
@ -0,0 +1,29 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block tabs %}
|
||||
{{ super() }}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block site_nav %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<style>
|
||||
h1 {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
||||
<section class="mdx-container">
|
||||
<div class="md-grid md-typeset">
|
||||
<div class="mdx-hero"></div>
|
||||
<h1>
|
||||
<span class='fas fa-search'></span>
|
||||
Page not found
|
||||
</h1>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% endblock %}
|
47
docs/_includes/overrides/home.html
Normal file
47
docs/_includes/overrides/home.html
Normal file
@ -0,0 +1,47 @@
|
||||
{% extends "main.html" %}
|
||||
|
||||
{% block tabs %}
|
||||
{{ super() }}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{{ page.content }}
|
||||
|
||||
<style>
|
||||
h1 {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- Hero for landing page -->
|
||||
<section class="mdx-container">
|
||||
<div class="md-grid md-typeset">
|
||||
<div class="mdx-hero">
|
||||
|
||||
<!-- Hero content -->
|
||||
<div class="mdx-hero__content">
|
||||
|
||||
<a href="https://inventree.org" title="InvenTree Website" class="md-button">
|
||||
<span class='fas fa-globe'></span> Website
|
||||
</a>
|
||||
|
||||
<a href="start/intro" title="Install InvenTree" class="md-button">
|
||||
<span class='fas fa-server'></span> Install
|
||||
</a>
|
||||
<a href="app/app" title="InvenTree mobile app" class="md-button">
|
||||
<span class='fas fa-mobile-alt'></span> Mobile App
|
||||
</a>
|
||||
<a href="https://crowdin.com/project/inventree" title="Help translate InvenTree" class="md-button">
|
||||
<span class='fas fa-language'></span> Translate
|
||||
</a>
|
||||
<a href="https://github.com/inventree/inventree" title="Explore InvenTree source code" class="md-button md-button">
|
||||
<span class='fab fa-github'></span> Source Code
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% endblock %}
|
6
docs/_includes/overrides/main.html
Normal file
6
docs/_includes/overrides/main.html
Normal file
@ -0,0 +1,6 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block header %}
|
||||
{% include "partials/version_banner.html" %}
|
||||
{% include "partials/header.html" %}
|
||||
{% endblock %}
|
1
docs/_includes/overrides/partials/outdated.html
Normal file
1
docs/_includes/overrides/partials/outdated.html
Normal file
@ -0,0 +1 @@
|
||||
<!-- Empty "outdated" warning, we will handle this in 'banner.html' -->
|
15
docs/_includes/overrides/partials/version_banner.html
Normal file
15
docs/_includes/overrides/partials/version_banner.html
Normal file
@ -0,0 +1,15 @@
|
||||
{% if config.version_banner %}
|
||||
<div class='alert alert-warning alert-dismissable alert-version' role='alert'>
|
||||
<div class='md-grid md-typeset'>
|
||||
<small>
|
||||
{% if config.readthedocs.version == 'latest' %}
|
||||
This documentation is for the <em>development</em> version of InvenTree, which may be significantly different from the stable releases.
|
||||
{% else %}
|
||||
This documentation is for an outdated version of InvenTree.
|
||||
{% endif %}
|
||||
For <em>stable</em> release documentation, use the version selector located in the bottom right corner of this page.
|
||||
</small>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
29
docs/_includes/release_table.html
Normal file
29
docs/_includes/release_table.html
Normal file
@ -0,0 +1,29 @@
|
||||
|
||||
<tr>
|
||||
<td colspan='2'><b><i>Release {{ prefix }}.x</i></b></td>
|
||||
<td colspan='2'></td>
|
||||
</tr>
|
||||
{% for release in config.releases %}
|
||||
{% if release.prefix == prefix %}
|
||||
<tr>
|
||||
<td>
|
||||
{% if release.local_path %}
|
||||
<a href="../{{ release.tag_name }}">{{ release.tag_name }}</a>
|
||||
{% else %}
|
||||
{{ release.tag_name }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ release.date }}</td>
|
||||
<td>
|
||||
<a href="https://github.com/inventree/InvenTree/releases/tag/{{ release.tag_name }}">{{ release.tag_name }}</a>
|
||||
</td>
|
||||
<td>
|
||||
{% if release.docker %}
|
||||
<a href="https://hub.docker.com/r/inventree/inventree/tags">inventree/inventree:{{ release.tag_name }}</a>
|
||||
{% else %}
|
||||
<em>Not available for this release</em>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
13
docs/_includes/release_table_head.html
Normal file
13
docs/_includes/release_table_head.html
Normal file
@ -0,0 +1,13 @@
|
||||
|
||||
<div class='md-typeset__scrollwrap'>
|
||||
<div class='md-typeset__table'>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><span class='fas fa-clipboard-list'></span> Release</th>
|
||||
<th><span class='fas fa-calendar-alt'></span> Date</th>
|
||||
<th><span class='fab fa-github'></span> GitHub</th>
|
||||
<th><span class='fab fa-docker'></span> Docker</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
4
docs/_includes/release_table_tail.html
Normal file
4
docs/_includes/release_table_tail.html
Normal file
@ -0,0 +1,4 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
10
docs/_includes/splide_image.html
Normal file
10
docs/_includes/splide_image.html
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
{% if 'http' in src %}
|
||||
{% set img_url = src %}
|
||||
{% else %}
|
||||
{% set img_url = config.assets_dir + '/images/' + src %}
|
||||
{% endif %}
|
||||
|
||||
<li class='splide__slide'>
|
||||
<img src='{{ img_url }}'>
|
||||
</li>
|
Reference in New Issue
Block a user