Generate documentation homepage from README

This commit is contained in:
fnux 2021-01-11 11:34:54 +01:00
parent ec41ef3490
commit ec0dc30c87
No known key found for this signature in database
GPG key ID: 4502C902C00A1E12
4 changed files with 12 additions and 16 deletions

View file

@ -25,5 +25,5 @@ docs:
- echo "$CD_SSH_SERVER_HOSTKEYS" > ~/.ssh/known_hosts - echo "$CD_SSH_SERVER_HOSTKEYS" > ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts - chmod 644 ~/.ssh/known_hosts
script: script:
- make docs - make html
- sftp fnux@staticwebhosting.ungleich.ch:public_html/cdist-contrib <<< "put -r docs/dist/html/*" - sftp fnux@staticwebhosting.ungleich.ch:public_html/cdist-contrib <<< "put -r docs/dist/html/*"

View file

@ -6,7 +6,8 @@ maintained in cdist itself or were not accepted in code cdist but could still
be useful. be useful.
This project does not have releases and is continously updated: see git history This project does not have releases and is continously updated: see git history
for change log. for change log. You will find HTML documentation at
[contrib.cdi.st](https://contrib.cdi.st).
## Using cdist-contrib ## Using cdist-contrib

View file

@ -9,23 +9,18 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname"
filename="${__cdist_myname%.sh}" filename="${__cdist_myname%.sh}"
dest="$__cdist_abs_mydir/$filename" dest="$__cdist_abs_mydir/$filename"
if ! command -v pandoc > /dev/null; then
echo "Pandoc is required to generate HTML index from README." >&2
exit 1
fi
cd "$__cdist_abs_mydir" cd "$__cdist_abs_mydir"
exec > "$dest" exec > "$dest"
pandoc -f markdown -t rst ../../README.md
cat << EOF cat << EOF
cdist-contrib - Community maintained cdist types
================================================
This project extends the \`cdist <https://cdi.st/>\`_ configuration management
tool with community-maitained types which are either too specific to fit/be
maintained in cdist itself or were not accepted in code cdist but could still
be useful.
Please note this project is a **rolling release**! The documentation you're
reading has been generated from the |version| state (commit |release|).
Sources are available on \`code.ungleich.ch
<https://code.ungleich.ch/ungleich-public/cdist-contrib>\`_.
.. toctree:: .. toctree::
:hidden: :hidden:

View file

@ -4,4 +4,4 @@ FROM fedora:latest
MAINTAINER Timothée Floure <fnux@ungleich.ch> MAINTAINER Timothée Floure <fnux@ungleich.ch>
RUN dnf install -y git findutils make python3-sphinx python3-sphinx_rtd_theme \ RUN dnf install -y git findutils make python3-sphinx python3-sphinx_rtd_theme \
ShellCheck openssh-clients ShellCheck openssh-clients pandoc