Technical details¶
The sphinx-simplepdf registers the following stuff:
A sphinx builder, called simplepdf. Code inside /builders/simplepdf.py.
A sphinx theme, called sphinx-simplepdf. Files under /themes/sphinx_simplepdf.
During package installation, builder and theme get registered for Sphinx. This is done via the enytry__points
mechanism.
'static/styles/*.css',
'static/js/*.js',
'static/fonts/*.*'
]},
include_package_data=True,
# See http://www.sphinx-doc.org/en/stable/theming.html#distribute-your-theme-as-a-python-package
entry_points={
'sphinx.html_themes': [
Workflow¶
User calls
make simplepdf.simplepdfbuilder overwrites theme to usesphinx-simplepdf.Builder generates
main.cssfrommain.scssfiles. Injects also config-vars fromsimplepdf_vars.Builder starts a SingleFileHTML based build.
Sphinx creates one single
index.html.Builder manipulates created
index.html:Fixes toc-tree links
Builders starts weasyprint with
index.htmlas inputDone, PDF file exists under
_build/simplepdf.
DEMO project¶
The DEMO project is stored under /demo/ and provides a common way for all developers and users to test everything on a common base.
It can be build by the following steps:
git clone git@github.com:useblocks/sphinx-simplepdf.gitcd sphinx-simplepdfpip install .cd demopip install -r doc-requirements.txtsphinx-build -a -E -b simplepdf . _build/