2
0
mirror of https://github.com/inventree/inventree-docs.git synced 2025-04-27 05:06:43 +00:00
inventree-docs/main.py
Oliver ecd29e9b4d
Update configuration documentation (#342)
* Update docs for config.yaml

(cherry picked from commit eb7d4bb251f8c59f4dba2ebce67e6a3d27bd233e)

* Add more settings

(cherry picked from commit 70cf34c7afaef23133d3215e957add6ffa3a4928)

* Config docs cleanup

* Update docker dev quickstart guide

* plugin settings

* Document currency support

* Add extra information for secret_key

* Slight tweaks to docker setup guide
2022-07-31 19:26:49 +10:00

32 lines
622 B
Python

import os
from posixpath import dirname
from urllib import request
def define_env(env):
@env.macro
def listimages(subdir):
"""
Return a listing of all asset files in the provided subdir
"""
here = os.path.dirname(__file__)
directory = os.path.join(here, 'docs', 'assets', 'images', subdir)
assets = []
allowed = [
'.png',
'.jpg',
]
for asset in os.listdir(directory):
if any([asset.endswith(x) for x in allowed]):
assets.append(os.path.join(subdir, asset))
return assets