Use external builders to generate different formats (build.jobs
)
Use
zundler
to create the HTMLZip versionUse
SimplePDF
to generate the PDF version
Read the Docs .readthedocs.yaml
configuration file used to build this docs.
1version: 2
2
3build:
4 os: ubuntu-22.04
5 tools:
6 python: "3"
7 apt_packages:
8 - tree
9 - libmagic1 # python-magic
10 - graphviz # dot command
11 jobs:
12 post_build:
13 - mkdir --parents _readthedocs/htmlzip _readthedocs/pdf
14 - sphinx-build -b zundler docs/ _readthedocs/$READTHEDOCS_PROJECT
15 - cd _readthedocs ; zip -r -j htmlzip/$READTHEDOCS_PROJECT.zip $READTHEDOCS_PROJECT
16 - sphinx-build -M simplepdf docs/ _readthedocs/
17 - mv _readthedocs/simplepdf/"Test Builds.pdf" _readthedocs/pdf/$READTHEDOCS_PROJECT.pdf
18
19sphinx:
20 configuration: docs/conf.py
21
22python:
23 install:
24 - requirements: requirements.txt
requirements.txt
used to build these docs.
1sphinx-autorun
2git+https://github.com/AdrianVollmer/Zundler@main#egg=Zundler
3sphinx-simplepdf
4sphinx-rtd-theme==1.2.0rc3
5sphinx<6
6
7# Sphinx docs requirements
8sphinxcontrib-websupport
Sphinx configuration file used to build this docs (see full file),
1# -*- coding: utf-8 -*-
2
3# Default settings
4project = 'Test Builds'
5extensions = [
6 'sphinx_autorun',
7 'sphinx_simplepdf',
8]
9
10latex_engine = 'xelatex' # allow us to build Unicode chars
11
12
13# Include all your settings here
14html_theme = 'sphinx_rtd_theme'
15html_static_path = ['_static']
16
17
18
19
>>> # Build at
>>> import datetime
>>> datetime.datetime.utcnow() # UTC
datetime.datetime(2023, 1, 25, 10, 22, 57, 39824)