Convert docbook documentation to markdown, add build mechanism using pandoc
This commit is contained in:
parent
db5ff8c356
commit
72609641db
26 changed files with 4273 additions and 6022 deletions
33
docs/gen-docs.sh
Executable file
33
docs/gen-docs.sh
Executable file
|
|
@ -0,0 +1,33 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Source documentation in markdown lives in the src/ folder (html and manpages).
|
||||
# This is what you should edit if you want to make changes to the documentation.
|
||||
# From these sources, this script generates actual manpages and general
|
||||
# documentation in html using pandoc.
|
||||
|
||||
if ! [ -x "$(command -v pandoc)" ]; then
|
||||
echo "Pandoc is missing, please install it first"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# First we generate manpages
|
||||
|
||||
echo "Manpages generation …"
|
||||
|
||||
for src in src/man/*.md
|
||||
do
|
||||
pandoc -f markdown -t man "$src" > manpages/"$(basename "$src" .md)" && echo "$(basename "$src" .md) successfully built in docs/manpages directory" || echo "Unable to generate manpage from $src"
|
||||
done
|
||||
|
||||
# We then generate the rest of the documentation
|
||||
|
||||
echo ""
|
||||
|
||||
echo "HTML generation …"
|
||||
|
||||
|
||||
for src in src/html/*.md
|
||||
do
|
||||
pandoc -f markdown -t html "$src" > html/"$(basename "$src" .md)".html && echo "$(basename "$src" .md).html successfully built in docs/html directory" || echo "Unable to generate html from $src"
|
||||
done
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue