Publier la documentation de Chill en ligne après chaque mise à jour (#14)
Reviewed-on: #14 Co-authored-by: Julien Fastré <julien.fastre@champs-libres.coop> Co-committed-by: Julien Fastré <julien.fastre@champs-libres.coop>
This commit is contained in:
@@ -4,7 +4,8 @@ set -e
|
||||
|
||||
# enter the current directory
|
||||
cd "$(dirname $0)"
|
||||
export PANDOC_DIR="/pandoc/cl"
|
||||
export PANDOC_DIR="$(pwd)/pandoc/cl"
|
||||
export OUTPUT_DIR="$(pwd)"
|
||||
|
||||
|
||||
if [ -z $1 ]; then
|
||||
@@ -59,23 +60,22 @@ else
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
cd $kind
|
||||
export PDF_TEMPLATE="$(pwd)/eisvogel.latex"
|
||||
|
||||
cd $kind/docs
|
||||
|
||||
export ARGS="
|
||||
--from markdown
|
||||
--number-sections
|
||||
--resource-path ./.
|
||||
--metadata-file ./metadata.yaml
|
||||
`#--lua-filter "../${PANDOC_DIR}/format-link.lua`
|
||||
"
|
||||
export PDF_TEMPLATE="./../pandoc/template/eisvogel.tex"
|
||||
export LATEX_ARGS="
|
||||
--metadata=footer-left:$(date +%d-%m-%Y)
|
||||
--template "${PDF_TEMPLATE}"
|
||||
--lua-filter "../${PANDOC_DIR}/boxes.lua"
|
||||
--template ${PDF_TEMPLATE}
|
||||
--lua-filter "${PANDOC_DIR}/boxes.lua"
|
||||
"
|
||||
|
||||
|
||||
if [ $target = "latex" ]; then
|
||||
pandoc $ARGS $LATEX_ARGS \
|
||||
--to latex \
|
||||
@@ -84,18 +84,7 @@ elif [ $target = "pdf" ]; then
|
||||
pandoc $ARGS $LATEX_ARGS \
|
||||
--to pdf \
|
||||
--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
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user