Skip to content

Commit

Permalink
docs: replace sphinx-rtd-theme with sphinx-book-theme (#1657)
Browse files Browse the repository at this point in the history
Compared to `sphinx-rtd-theme`, `sphinx-book-theme` is a clean and
modern Sphinx theme.

Generated by the task: njzjz-bot/njzjz-bot#11.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Updated documentation theme to `sphinx_book_theme`, enhancing visual
presentation.
- Introduced options for light and dark logo images in the
documentation.

- **Bug Fixes**
- Updated dependency versions to ensure compatibility and improved
functionality.

- **Documentation**
- Enhanced configuration settings for better theme management in the
documentation.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Jinzhe Zeng <[email protected]>
Co-authored-by: Jinzhe Zeng <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Nov 6, 2024
1 parent 8629433 commit 0f7e15c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
12 changes: 9 additions & 3 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# ones.
# extensions = [
# 'recommonmark',
# "sphinx_rtd_theme",
# "sphinx_book_theme",
# 'myst_parser',
# 'sphinx_markdown_tables',
# 'sphinx.ext.autosummary'
Expand All @@ -39,7 +39,7 @@
extensions = [
"deepmodeling_sphinx",
"dargs.sphinx",
"sphinx_rtd_theme",
"sphinx_book_theme",
"myst_parser",
"sphinx.ext.autosummary",
"sphinx.ext.viewcode",
Expand Down Expand Up @@ -71,14 +71,20 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "sphinx_rtd_theme"
html_theme = "sphinx_book_theme"
html_logo = "_static/logo.svg"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
html_css_files = ["css/custom.css"]
html_theme_options = {
"logo": {
"image_light": "_static/logo.svg",
"image_dark": "_static/logo-dark.svg",
}
}

autodoc_default_flags = ["members"]
autosummary_generate = True
Expand Down
4 changes: 2 additions & 2 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# https://github.com/sphinx-doc/sphinx/issues/11662
sphinx>=4.0.2,!=7.2.5
recommonmark
sphinx_rtd_theme>=0.6
sphinx-book-theme
sphinx_markdown_tables
sphinx-argparse<0.5.0
myst-parser
deepmodeling_sphinx>=0.1.1
deepmodeling-sphinx>=0.3.0
dargs>=0.3.1
numpydoc
.

0 comments on commit 0f7e15c

Please sign in to comment.