Skip to content

Commit

Permalink
Using furo theme for Sphinx docs
Browse files Browse the repository at this point in the history
  • Loading branch information
TexZK committed Dec 1, 2023
1 parent caf5a06 commit 6bc483d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
Empty file added docs/_static/.keep
Empty file.
5 changes: 0 additions & 5 deletions docs/_static/css/my_theme.css

This file was deleted.

16 changes: 11 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
sphinx >= 6
sphinx-rtd-theme
sphinx >= 7
sphinx-click
sphinx-autodoc-typehints
furo
twine
-e .

0 comments on commit 6bc483d

Please sign in to comment.