Skip to content

Commit b5fa2e5

Browse files
xitij2000pshiu
authored andcommitted
chore: Switch from edx-sphinx-theme to sphinx-book-theme
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.
1 parent ae883c3 commit b5fa2e5

File tree

8 files changed

+220
-191
lines changed

8 files changed

+220
-191
lines changed

docs/conf.py

+39-10
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
from __future__ import absolute_import
1515

1616
import os
17+
from datetime import datetime
18+
1719

18-
import edx_theme
1920

2021
# on_rtd is whether we are on readthedocs.org
2122
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
@@ -33,7 +34,6 @@
3334
# Add any Sphinx extension module names here, as strings. They can be extensions
3435
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
3536
extensions = [
36-
'edx_theme',
3737
]
3838

3939
# Add any paths that contain templates here, relative to this directory.
@@ -50,8 +50,8 @@
5050

5151
# General information about the project.
5252
project = u'E-Commerce Service'
53-
author = edx_theme.AUTHOR
54-
copyright = edx_theme.COPYRIGHT # pylint: disable=redefined-builtin
53+
author = 'edX Inc.'
54+
copyright = f'{datetime.now().year}, edX Inc.' # pylint: disable=redefined-builtin
5555

5656
# The version info for the project you're documenting, acts as replacement for
5757
# |version| and |release|, also used in various other places throughout the
@@ -101,15 +101,44 @@
101101

102102
# The theme to use for HTML and HTML Help pages. See the documentation for
103103
# a list of builtin themes.
104-
html_theme = 'edx_theme'
104+
html_theme = 'sphinx_book_theme'
105105

106106
# Theme options are theme-specific and customize the look and feel of a theme
107107
# further. For a list of options available for each theme, see the
108108
# documentation.
109-
# html_theme_options = {}
110-
109+
html_theme_options = {
110+
"repository_url": "https://github.com/openedx/ecommerce",
111+
"repository_branch": "master",
112+
"path_to_docs": "docs/",
113+
"home_page_in_toc": True,
114+
"use_repository_button": True,
115+
"use_issues_button": True,
116+
"use_edit_page_button": True,
117+
# Please don't change unless you know what you're doing.
118+
"extra_footer": """
119+
<a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">
120+
<img
121+
alt="Creative Commons License"
122+
style="border-width:0"
123+
src="https://i.creativecommons.org/l/by-sa/4.0/80x15.png"/>
124+
</a>
125+
<br>
126+
These works by
127+
<a
128+
xmlns:cc="https://creativecommons.org/ns#"
129+
href="https://openedx.org"
130+
property="cc:attributionName"
131+
rel="cc:attributionURL"
132+
>The Center for Reimagining Learning</a>
133+
are licensed under a
134+
<a
135+
rel="license"
136+
href="https://creativecommons.org/licenses/by-sa/4.0/"
137+
>Creative Commons Attribution-ShareAlike 4.0 International License</a>.
138+
"""
139+
}
111140
# Add any paths that contain custom themes here, relative to this directory.
112-
html_theme_path = [edx_theme.get_html_theme_path()]
141+
# html_theme_path = []
113142

114143
# The name for this set of Sphinx documents. If None, it defaults to
115144
# "<project> v<release> documentation".
@@ -120,12 +149,12 @@
120149

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

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

130159
# Add any paths that contain custom static files (such as style sheets) here,
131160
# relative to this directory. They are copied after the builtin static files,

0 commit comments

Comments
 (0)