set up mkdocs
This commit is contained in:
parent
9fcc601730
commit
96a7cbe954
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
build/*
|
build/*
|
||||||
*-manual.pdf
|
*-manual.pdf
|
||||||
|
.venv/
|
||||||
|
3
Dockerfile
Normal file
3
Dockerfile
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
FROM nginx:alpine
|
||||||
|
LABEL authors="Julien Fastré"
|
||||||
|
|
1
admin/.gitignore
vendored
Normal file
1
admin/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
site/*
|
43
admin/mkdocs.yml
Normal file
43
admin/mkdocs.yml
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
---
|
||||||
|
site_name: "Manuel admnistrateur Chill"
|
||||||
|
site_url: https://manuel.chill.social/administrateur/
|
||||||
|
repo_url: https://gitea.champs-libres.be/Chill-project/manuals
|
||||||
|
repo_name: Chill-project/manuals
|
||||||
|
theme:
|
||||||
|
name: material
|
||||||
|
features:
|
||||||
|
- content.code.copy
|
||||||
|
- content.code.select
|
||||||
|
- content.code.annotate
|
||||||
|
nav:
|
||||||
|
- Accueil: index.md
|
||||||
|
- Génération de document: generation-documents.md
|
||||||
|
markdown_extensions:
|
||||||
|
- markdown_include.include
|
||||||
|
# code layout
|
||||||
|
- pymdownx.highlight:
|
||||||
|
anchor_linenums: true
|
||||||
|
line_spans: __span
|
||||||
|
pygments_lang_class: true
|
||||||
|
use_pygments: true
|
||||||
|
linenums: true
|
||||||
|
- pymdownx.inlinehilite
|
||||||
|
- pymdownx.snippets
|
||||||
|
- pymdownx.superfences
|
||||||
|
# admonition
|
||||||
|
- admonition
|
||||||
|
- pymdownx.details
|
||||||
|
- pymdownx.superfences
|
||||||
|
# use emojis
|
||||||
|
- attr_list
|
||||||
|
- pymdownx.emoji:
|
||||||
|
emoji_index: !!python/name:material.extensions.emoji.twemoji
|
||||||
|
emoji_generator: !!python/name:material.extensions.emoji.to_svg
|
||||||
|
# footnotes
|
||||||
|
- footnotes
|
||||||
|
# https://squidfunk.github.io/mkdocs-material/reference/formatting/?h=key#adding-keyboard-keys
|
||||||
|
- pymdownx.critic
|
||||||
|
- pymdownx.caret
|
||||||
|
- pymdownx.keys
|
||||||
|
- pymdownx.mark
|
||||||
|
- pymdownx.tilde
|
@ -4,7 +4,8 @@ set -e
|
|||||||
|
|
||||||
# enter the current directory
|
# enter the current directory
|
||||||
cd "$(dirname $0)"
|
cd "$(dirname $0)"
|
||||||
export PANDOC_DIR="/pandoc/cl"
|
export PANDOC_DIR="$(pwd)/pandoc/cl"
|
||||||
|
export OUTPUT_DIR="$(pwd)"
|
||||||
|
|
||||||
|
|
||||||
if [ -z $1 ]; then
|
if [ -z $1 ]; then
|
||||||
@ -59,7 +60,9 @@ else
|
|||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd $kind
|
export PDF_TEMPLATE="$(pwd)/eisvogel.latex"
|
||||||
|
|
||||||
|
cd $kind/docs
|
||||||
|
|
||||||
export ARGS="
|
export ARGS="
|
||||||
--from markdown
|
--from markdown
|
||||||
@ -67,14 +70,12 @@ export ARGS="
|
|||||||
--resource-path ./.
|
--resource-path ./.
|
||||||
--metadata-file ./metadata.yaml
|
--metadata-file ./metadata.yaml
|
||||||
"
|
"
|
||||||
export PDF_TEMPLATE="./../eisvogel.latex"
|
|
||||||
export LATEX_ARGS="
|
export LATEX_ARGS="
|
||||||
--metadata=footer-left:$(date +%d-%m-%Y)
|
--metadata=footer-left:$(date +%d-%m-%Y)
|
||||||
--template ${PDF_TEMPLATE}
|
--template ${PDF_TEMPLATE}
|
||||||
--lua-filter "..${PANDOC_DIR}/boxes.lua"
|
--lua-filter "${PANDOC_DIR}/boxes.lua"
|
||||||
"
|
"
|
||||||
|
|
||||||
|
|
||||||
if [ $target = "latex" ]; then
|
if [ $target = "latex" ]; then
|
||||||
pandoc $ARGS $LATEX_ARGS \
|
pandoc $ARGS $LATEX_ARGS \
|
||||||
--to latex \
|
--to latex \
|
||||||
@ -83,18 +84,7 @@ elif [ $target = "pdf" ]; then
|
|||||||
pandoc $ARGS $LATEX_ARGS \
|
pandoc $ARGS $LATEX_ARGS \
|
||||||
--to pdf \
|
--to pdf \
|
||||||
--pdf-engine xelatex \
|
--pdf-engine xelatex \
|
||||||
-o "./../$kind-manual.pdf" \
|
-o "${OUTPUT_DIR}/$kind-manual.pdf" \
|
||||||
$files
|
|
||||||
elif [ $target = "html" ]; then
|
|
||||||
# check target directory exists
|
|
||||||
if [ ! -d "./../build/html" ]; then
|
|
||||||
echo "create build/html directory"
|
|
||||||
mkdir -p "./../build/html"
|
|
||||||
fi
|
|
||||||
|
|
||||||
pandoc $ARGS \
|
|
||||||
--to html \
|
|
||||||
-o ./../build/html/index.html \
|
|
||||||
$files
|
$files
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
3
requirements.txt
Normal file
3
requirements.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
mkdocs
|
||||||
|
markdown-include
|
||||||
|
mkdocs-material
|
1
user/.gitignore
vendored
Normal file
1
user/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
site/*
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user