pdf-build-jobs

Use Read the Docs «normal workflow» to build the HTML, but use build.jobs to create a PDF and put it on $READTHEDOCS_OUTPUT/pdf so serve it using the regular API and flyout.


Read the Docs configuration file used to build this docs:

 1version: 2
 2
 3build:
 4  os: ubuntu-22.04
 5  tools:
 6    python: "3"
 7  jobs:
 8    post_build:
 9      - mkdir --parents $READTHEDOCS_OUTPUT/pdf
10      - wget https://www.sphinx-doc.org/_/downloads/en/master/pdf/ -O $READTHEDOCS_OUTPUT/pdf/$READTHEDOCS_PROJECT.pdf
11
12sphinx:
13  configuration: docs/conf.py
14
15python:
16  install:
17    - requirements: requirements.txt
18
19
20formats: []

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]
 8
 9latex_engine = 'xelatex'  # allow us to build Unicode chars
10
11
12# Include all your settings here
13html_theme = 'sphinx_rtd_theme'
14
15
16
17

>>> # Build at
>>> import datetime
>>> datetime.datetime.utcnow()  # UTC
datetime.datetime(2023, 8, 28, 10, 40, 22, 101310)