From cf057c6160fccbbf9262e964469603938fa65a95 Mon Sep 17 00:00:00 2001 From: "Bruno P. Kinoshita" Date: Mon, 26 Dec 2022 12:53:41 +0100 Subject: [PATCH] Add dependencies and configuration changes to allow a build that looks like RTD --- docs/README.md | 9 +++++++++ docs/requirements.txt | 2 ++ docs/source/conf.py | 5 +++-- 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 docs/README.md create mode 100644 docs/requirements.txt diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 000000000..de53f5433 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,9 @@ +To build the docs, install the `requirements.txt` in this folder and then run +`make html`. + +That should create a version identical to the one from ReadTheDocs, which can +be used to preview changes. The files will be stored in `build/html`. + +There may be warnings in the build output, but these are legacy and will be +addressed later. + diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 000000000..82133027c --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,2 @@ +sphinx +sphinx_rtd_theme diff --git a/docs/source/conf.py b/docs/source/conf.py index 2ab762b50..4e55fad9b 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -32,7 +32,8 @@ sys.path.insert(0, os.path.abspath('../..')) extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.imgmath', - 'sphinx.ext.autosectionlabel' + 'sphinx.ext.autosectionlabel', + 'sphinx_rtd_theme' ] numfig = True @@ -120,7 +121,7 @@ autodoc_mock_imports = ["portalocker", "argparse", "python-dateutil", "py3dotplu # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'default' +html_theme = 'sphinx_rtd_theme' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the -- GitLab