From 6bc483d92d38631f9cc84e72a74ae1d909a8d1a8 Mon Sep 17 00:00:00 2001 From: Andrea Zoppi Date: Fri, 1 Dec 2023 20:10:31 +0100 Subject: [PATCH] Using `furo` theme for Sphinx docs --- docs/_static/.keep | 0 docs/_static/css/my_theme.css | 5 ----- docs/conf.py | 16 +++++++++++----- docs/requirements.txt | 4 ++-- 4 files changed, 13 insertions(+), 12 deletions(-) create mode 100644 docs/_static/.keep delete mode 100644 docs/_static/css/my_theme.css diff --git a/docs/_static/.keep b/docs/_static/.keep new file mode 100644 index 0000000..e69de29 diff --git a/docs/_static/css/my_theme.css b/docs/_static/css/my_theme.css deleted file mode 100644 index 9cc81d3..0000000 --- a/docs/_static/css/my_theme.css +++ /dev/null @@ -1,5 +0,0 @@ -@import url("theme.css"); - -.wy-nav-content { - max-width: none; -} diff --git a/docs/conf.py b/docs/conf.py index 2f31754..3df4f27 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -43,21 +43,27 @@ def read_version(): 'issue': ('https://github.com/TexZK/hexrec/issues/%s', '#'), 'pr': ('https://github.com/TexZK/hexrec/pull/%s', 'PR #'), } + # on_rtd is whether we are on readthedocs.org -on_rtd = os.environ.get('READTHEDOCS', None) == 'True' +#on_rtd = os.environ.get('READTHEDOCS', None) == 'True' -if not on_rtd: # only set the theme if we're building docs locally - html_theme = 'sphinx_rtd_theme' +html_theme = 'furo' html_use_smartypants = True html_last_updated_fmt = '%Y-%m-%d' html_split_index = False html_sidebars = { - '**': ['searchbox.html', 'globaltoc.html', 'sourcelink.html'], + "**": [ + "sidebar/scroll-start.html", + "sidebar/brand.html", + "sidebar/search.html", + "sidebar/navigation.html", + "sidebar/ethical-ads.html", + "sidebar/scroll-end.html", + ], } html_short_title = f'{project}-{version}' html_static_path = ['_static'] -html_style = 'css/my_theme.css' autosummary_generate = True autosummary_generate_overwrite = True diff --git a/docs/requirements.txt b/docs/requirements.txt index 1bc3e66..8ad66a3 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,6 +1,6 @@ -sphinx >= 6 -sphinx-rtd-theme +sphinx >= 7 sphinx-click sphinx-autodoc-typehints +furo twine -e .