add html documentation generation through sphinx
makefile: add a target to install sphinx and build static HTML documentation from markdown, locally
This commit is contained in:
22
Makefile
22
Makefile
@@ -93,3 +93,25 @@ update_todo:
|
||||
echo '<!-- This file is automatically generated by "make update_todo" -->' > doc/md/TODO.md
|
||||
./gitea-cli/bin/gitea issues zerodb/debian-live-config | jq -r '.[] | "- #\(.number) - \(.title)"' >> doc/md/TODO.md; \
|
||||
rm -rf gitea-cli
|
||||
|
||||
doc: install_dev_docs doc_md doc_html
|
||||
|
||||
# install documentation generator (sphinx + markdown + theme)
|
||||
install_dev_docs:
|
||||
python3 -m venv .venv/
|
||||
source .venv/bin/activate && pip3 install sphinx recommonmark sphinx_rtd_theme
|
||||
|
||||
doc_md:
|
||||
cp README.md doc/md/index.md
|
||||
cp CHANGELOG.md doc/md/
|
||||
cp LICENSE doc/md/LICENSE.md
|
||||
sed -i 's|doc/md/||g' doc/md/*.md
|
||||
./doc/gen_package_lists.py
|
||||
|
||||
# HTML documentation generation (sphinx-build --help)
|
||||
SPHINXOPTS ?=
|
||||
SPHINXBUILD ?= sphinx-build
|
||||
SOURCEDIR = doc/md # répertoire source (markdown)
|
||||
BUILDDIR = doc/html # répertoire destination (html)
|
||||
doc_html:
|
||||
source .venv/bin/activate && sphinx-build -c doc/md -b html doc/md doc/html
|
||||
|
||||
Reference in New Issue
Block a user