diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4463751e..cbd2634f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -15,6 +15,9 @@ Unreleased ~~~~~~~~~~ * Rename toggle_warnings to toggle_warning for consistency with setting_warning. +* Switch from ``edx-sphinx-theme`` to ``sphinx-book-theme`` since the former is + deprecated + [5.0.0] - 2022-04-22 -------------------- diff --git a/docs/conf.py b/docs/conf.py index 5736c200..d9a4645d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -17,9 +17,9 @@ import os import re import sys +from datetime import datetime from subprocess import check_call -import edx_theme from django import setup as django_setup from django.conf import settings @@ -63,7 +63,6 @@ def get_version(*file_paths): # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'edx_theme', 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', @@ -94,8 +93,8 @@ def get_version(*file_paths): # General information about the project. project = 'edx-toggles' -copyright = edx_theme.COPYRIGHT # pylint: disable=redefined-builtin -author = edx_theme.AUTHOR +copyright = f'{datetime.now().year}, Axim Collaborative, Inc' # pylint: disable=redefined-builtin +author = 'Axim Collaborative, Inc' project_title = 'edx-toggles' documentation_title = f"{project_title}" @@ -166,16 +165,46 @@ def get_version(*file_paths): # 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/edx-toggles", + "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": """ + + Creative Commons License + +
+ These works by + Axim Collaborative, Inc + are licensed under a + Creative Commons Attribution-ShareAlike 4.0 International License. + """ +} # 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. # " v documentation" by default. @@ -189,13 +218,13 @@ def get_version(*file_paths): # 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 (relative to this directory) to use as a 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, diff --git a/requirements/doc.in b/requirements/doc.in index 5528b8ef..e1f1740f 100644 --- a/requirements/doc.in +++ b/requirements/doc.in @@ -5,7 +5,7 @@ -r test.txt # Core and testing dependencies for this package doc8 # reStructuredText style checker -edx_sphinx_theme # edX theme for Sphinx output +sphinx-book-theme # Common theme for all Open edX projects twine # Validates README.rst for usage on PyPI build # Needed to build the wheel for twine README check Sphinx # Documentation builder diff --git a/requirements/doc.txt b/requirements/doc.txt index dd5dcc86..1b8cfd90 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -4,6 +4,8 @@ # # make upgrade # +accessible-pygments==0.0.4 + # via pydata-sphinx-theme alabaster==0.7.13 # via sphinx asgiref==3.6.0 @@ -13,7 +15,11 @@ asgiref==3.6.0 atlassian-python-api==3.36.0 # via -r requirements/test.txt 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 build==0.10.0 @@ -25,6 +31,7 @@ certifi==2022.12.7 cffi==1.15.1 # via # -r requirements/test.txt + # cryptography # pynacl charset-normalizer==3.1.0 # via @@ -41,6 +48,8 @@ coverage[toml]==7.2.3 # via # -r requirements/test.txt # pytest-cov +cryptography==40.0.1 + # via secretstorage deprecated==1.2.13 # via # -r requirements/test.txt @@ -64,13 +73,12 @@ doc8==1.1.1 docutils==0.19 # via # doc8 + # pydata-sphinx-theme # readme-renderer # restructuredtext-lint # sphinx edx-django-utils==5.4.0 # via -r requirements/test.txt -edx-sphinx-theme==3.1.0 - # via -r requirements/doc.in exceptiongroup==1.1.1 # via # -r requirements/test.txt @@ -94,6 +102,10 @@ iniconfig==2.0.0 # pytest jaraco-classes==3.2.3 # via keyring +jeepney==0.8.0 + # via + # keyring + # secretstorage jinja2==3.1.2 # via # -r requirements/test.txt @@ -124,6 +136,7 @@ packaging==23.1 # via # -r requirements/test.txt # build + # pydata-sphinx-theme # pytest # sphinx pbr==5.11.1 @@ -144,9 +157,13 @@ pycparser==2.21 # via # -r requirements/test.txt # cffi +pydata-sphinx-theme==0.13.3 + # via sphinx-book-theme pygments==2.15.0 # via + # accessible-pygments # doc8 + # pydata-sphinx-theme # readme-renderer # rich # sphinx @@ -200,20 +217,26 @@ rfc3986==2.0.0 # via twine rich==13.3.4 # via twine +secretstorage==3.3.3 + # via keyring six==1.16.0 # via # -r requirements/test.txt # atlassian-python-api # bleach - # edx-sphinx-theme # stevedore snowballstemmer==2.2.0 # via sphinx +soupsieve==2.4 + # 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 @@ -252,7 +275,9 @@ tomli==2.0.1 twine==4.0.2 # via -r requirements/doc.in typing-extensions==4.5.0 - # via rich + # via + # pydata-sphinx-theme + # rich urllib3==1.26.15 # via # -r requirements/test.txt