Skip to content

Commit

Permalink
chore: Switch from edx-sphinx-theme to sphinx-book-theme
Browse files Browse the repository at this point in the history
The edx-sphinx theme is being deprecated, and replaced with sphinx-book-theme.
This removes references to the deprecated theme and replaces them with the new
standard theme for the platform.

See openedx/edx-sphinx-theme#184
  • Loading branch information
xitij2000 authored and feanil committed Jun 1, 2023
1 parent c740a68 commit 75c9c27
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 20 deletions.
50 changes: 39 additions & 11 deletions docs/conf.py
Expand Up @@ -9,7 +9,7 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import edx_theme
from datetime import datetime

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand All @@ -23,9 +23,7 @@

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
"edx_theme",
]
extensions = []

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
Expand All @@ -41,8 +39,8 @@

# General information about the project.
project = "edX Credentials"
author = edx_theme.AUTHOR
copyright = edx_theme.COPYRIGHT
copyright = f"{datetime.now().year}, Axim Collaborative, Inc" # pylint: disable=redefined-builtin
author = "Axim Collaborative, Inc"

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -92,15 +90,45 @@

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = "edx_theme"
html_theme = "sphinx_book_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
# documentation.
# html_theme_options = {}
html_theme_options = {
"repository_url": "https://github.com/openedx/credentials",
"repository_branch": "master",
"path_to_docs": "docs/",
"home_page_in_toc": True,
"use_repository_button": True,
"use_issues_button": True,
"use_edit_page_button": True,
# Please don't change unless you know what you're doing.
"extra_footer": """
<a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">
<img
alt="Creative Commons License"
style="border-width:0"
src="https://i.creativecommons.org/l/by-sa/4.0/80x15.png"/>
</a>
<br>
These works by
<a
xmlns:cc="https://creativecommons.org/ns#"
href="https://openedx.org"
property="cc:attributionName"
rel="cc:attributionURL"
>Axim Collaborative, Inc</a>
are licensed under a
<a
rel="license"
href="https://creativecommons.org/licenses/by-sa/4.0/"
>Creative Commons Attribution-ShareAlike 4.0 International License</a>.
""",
}

# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = [edx_theme.get_html_theme_path()]
# html_theme_path = []

# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
Expand All @@ -111,12 +139,12 @@

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
# html_logo = None
html_logo = "https://logos.openedx.org/open-edx-logo-color.png"

# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
# html_favicon = None
html_favicon = "https://logos.openedx.org/open-edx-favicon.ico"

# 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,
Expand Down
2 changes: 1 addition & 1 deletion requirements/docs.in
Expand Up @@ -9,6 +9,6 @@

-c constraints.txt

edx-sphinx-theme
sphinx-book-theme
Sphinx
jsx-lexer # A JSX lexer for Pygments
33 changes: 25 additions & 8 deletions requirements/docs.txt
Expand Up @@ -4,18 +4,24 @@
#
# make upgrade
#
accessible-pygments==0.0.4
# via pydata-sphinx-theme
alabaster==0.7.13
# via sphinx
babel==2.12.1
# via sphinx
# via
# pydata-sphinx-theme
# sphinx
beautifulsoup4==4.12.2
# via pydata-sphinx-theme
certifi==2023.5.7
# via requests
charset-normalizer==3.1.0
# via requests
docutils==0.19
# via sphinx
edx-sphinx-theme==3.1.0
# via -r requirements/docs.in
# via
# pydata-sphinx-theme
# sphinx
idna==3.4
# via requests
imagesize==1.4.1
Expand All @@ -29,25 +35,34 @@ jsx-lexer==2.0.1
markupsafe==2.1.2
# via jinja2
packaging==23.1
# via sphinx
# via
# pydata-sphinx-theme
# sphinx
pydata-sphinx-theme==0.13.3
# via sphinx-book-theme
pygments==2.15.1
# via
# accessible-pygments
# jsx-lexer
# pydata-sphinx-theme
# sphinx
pytz==2023.3
# via babel
requests==2.31.0
# via sphinx
six==1.16.0
# via edx-sphinx-theme
snowballstemmer==2.2.0
# via sphinx
soupsieve==2.4.1
# via beautifulsoup4
sphinx==5.3.0
# via
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
# -r requirements/docs.in
# edx-sphinx-theme
# pydata-sphinx-theme
# sphinx-book-theme
sphinx-book-theme==1.0.1
# via -r requirements/docs.in
sphinxcontrib-applehelp==1.0.4
# via sphinx
sphinxcontrib-devhelp==1.0.2
Expand All @@ -60,6 +75,8 @@ sphinxcontrib-qthelp==1.0.3
# via sphinx
sphinxcontrib-serializinghtml==1.1.5
# via sphinx
typing-extensions==4.6.2
# via pydata-sphinx-theme
urllib3==1.26.16
# via
# -c requirements/constraints.txt
Expand Down

0 comments on commit 75c9c27

Please sign in to comment.