Skip to content

Commit

Permalink
docs: fix epub and explain how to build local docs
Browse files Browse the repository at this point in the history
* Add "html_title" to avoid warning when building epub format:
  WARNING: conf value "epub_title" (or "html_title") should not be
  empty for EPUB3
* Explain how to build docs locally using Sphinx in installation.rst.
* Add "SPHINXOPTS = -W --keep-going" to Makefile for Sphinx builds.
*
  • Loading branch information
GraemeWatt committed Nov 3, 2023
1 parent a74e9f7 commit 6768f3e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXOPTS = -W --keep-going
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def __getattr__(cls, name):
master_doc = 'index'

# General information about the project.
project = u''
project = u'HEPData Converter'
copyright = u'2016, CERN'
author = u'CERN'

Expand Down Expand Up @@ -167,7 +167,7 @@ def __getattr__(cls, name):

# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
html_title = f"{project} v{version} documentation"

# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
Expand Down
12 changes: 12 additions & 0 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,18 @@ Developers can then run the tests with the following command:
python -m unittest discover hepdata_converter/testsuite 'test_*'
The documentation can be built locally in the virtual environment using Sphinx:

.. code:: console
(venv)$ pip install -e '.[docs]'
(venv)$ cd docs
(venv)$ make html
Then view the output by opening a web browser at ``_build/html/index.html``.
Developers should also check that they can successfully build other formats using ``make latexpdf`` and ``make epub``.
All three formats will be built by *Read the Docs* for the ``main`` branch on GitHub.


Docker
------
Expand Down

0 comments on commit 6768f3e

Please sign in to comment.