Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

chore: Switch from edx-sphinx-theme to sphinx-book-theme #426

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 40 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os
import sys
import edx_theme
from datetime import datetime


# If extensions (or modules to document with autodoc) are in another directory,
Expand All @@ -12,7 +12,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 = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx.ext.napoleon', 'edx_theme']
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx.ext.napoleon']

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

# General information about the project.
project = 'bok-choy'
copyright = edx_theme.COPYRIGHT
author = edx_theme.AUTHOR
copyright = f'{datetime.now().year}, The Axim Collaborative' # pylint: disable=redefined-builtin
author = 'The Axim Collaborative'

# 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 All @@ -56,13 +56,46 @@

# 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_path = [edx_theme.get_html_theme_path()]
html_favicon = os.path.join(html_theme_path[0], 'edx_theme', 'static', 'css', 'favicon.ico')
html_theme = 'sphinx_book_theme'
# html_theme_path = []
html_logo = "https://logos.openedx.org/open-edx-logo-color.png"
html_favicon = "https://logos.openedx.org/open-edx-favicon.ico"

# Output file base name for HTML help builder.
htmlhelp_basename = 'bok-choydoc'

html_theme_options = {
"repository_url": "https://github.com/openedx/bok-choy",
"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"
>The Axim Collaborative</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>.
"""
}


# -- Options for LaTeX output --------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion requirements/doc.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

-r base.txt # Core bok-choy dependencies

edx-sphinx-theme # edX theme for Sphinx output
sphinx-book-theme # Common theme for all Open edX projects
readme_renderer # Validates README.rst for usage on PyPI
sphinx # Documentation builder
32 changes: 24 additions & 8 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@
#
# 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
bleach==6.0.0
# via readme-renderer
certifi==2022.12.7
Expand All @@ -16,10 +22,9 @@ charset-normalizer==3.1.0
# via requests
docutils==0.19
# via
# pydata-sphinx-theme
# readme-renderer
# sphinx
edx-sphinx-theme==3.1.0
# via -r requirements/doc.in
idna==3.4
# via requests
imagesize==1.4.1
Expand All @@ -33,9 +38,15 @@ lazy==1.5
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
# pydata-sphinx-theme
# readme-renderer
# sphinx
pytz==2023.3
Expand All @@ -47,16 +58,19 @@ requests==2.28.2
selenium==3.141.0
# via -r requirements/base.txt
six==1.16.0
# via
# bleach
# edx-sphinx-theme
# via bleach
snowballstemmer==2.2.0
# via sphinx
soupsieve==2.4.1
# via beautifulsoup4
sphinx==5.3.0
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -r requirements/doc.in
# edx-sphinx-theme
# pydata-sphinx-theme
# sphinx-book-theme
sphinx-book-theme==1.0.1
# via -r requirements/doc.in
sphinxcontrib-applehelp==1.0.4
# via sphinx
sphinxcontrib-devhelp==1.0.2
Expand All @@ -69,6 +83,8 @@ sphinxcontrib-qthelp==1.0.3
# via sphinx
sphinxcontrib-serializinghtml==1.1.5
# via sphinx
typing-extensions==4.5.0
# via pydata-sphinx-theme
urllib3==1.26.15
# via
# -r requirements/base.txt
Expand Down