Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dev tool to build themes #379

Closed
wants to merge 13 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ nbsphinx.egg-info/
.python-version
.vscode
doc/_build

dev_utils/_build
dev_utils/tmp
dev_utils/requirements_themes.txt
29 changes: 29 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,34 @@ Again, you'll probably have to use ``python`` instead of ``python3``.
The generated files will be available in the directories ``build/sphinx/html/``
and ``build/sphinx/latex/``, respectively.

Building Themes
---------------

The ``nbsphinx`` documentation is available in over 30 different `HTML themes`_,
with each having its own branch ending in ``-theme``.

To simplify the building and testing of themes,
which is especially needed when changing CSS,
we provide you with command line tool to build all themes
or a user specified subset.
The tool is located at ``dev_utils/theme_builder.py`` and can be run with::

python3 dev_utils/theme_builder.py

On its first run, it will just create ``dev_utils/requirements_themes.txt``
which contains the dependencies to build all themes and instructs
you how to install them.
And after it will by default build all supported themes.

If you just want to build a subset of the themes
(i.e. ``alabaster`` and ``sphinx_rtd_theme``), simply run::

python3 dev_utils/theme_builder.py --themes alabaster rtd

for more information run::

python3 dev_utils/theme_builder.py --help

.. _PyPI: https://pypi.org/project/nbsphinx/
.. _Github: https://github.com/spatialaudio/nbsphinx/
.. _`HTML themes`: https://nbsphinx.readthedocs.io/usage.html#HTML-Themes
Loading