From 303dfb0b99ebdb7cfec91a27a4325ced7a2b8e4c Mon Sep 17 00:00:00 2001 From: Mark Walker Date: Fri, 18 Jun 2021 16:59:46 +0100 Subject: [PATCH 1/2] Swapped docs theme to furo. --- docs/conf.py | 23 ++++++++--------------- docs/requirements.txt | 6 ++++-- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index cc71d9a1981..f907a2e5493 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -37,7 +37,9 @@ 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', - 'sphinxcontrib.spelling' + 'sphinxcontrib.spelling', + "sphinx_copybutton", + "sphinxext.opengraph", ] intersphinx_mapping = { 'python': ('https://docs.python.org/3/', None), @@ -129,22 +131,13 @@ on_rtd = os.environ.get('READTHEDOCS', None) == 'True' try: - import divio_docs_theme - html_theme = 'divio_docs_theme' - html_theme_path = [divio_docs_theme.get_html_theme_path()] + import furo + + html_theme = 'furo' html_theme_options = { - 'show_cloud_banner': True, - 'cloud_banner_markup': """ -
- The django CMS Association -

The django CMS Association is a non-profit organisation that funds and - steers the development of django CMS, and nurtures its world-wide - community of developers and users.

- Join us -
- """, + "navigation_with_keys": True, } -except: +except ImportError: html_theme = 'default' diff --git a/docs/requirements.txt b/docs/requirements.txt index 79050b9b4d0..cb72523b2fe 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,10 +1,12 @@ MarkupSafe==0.23 Pygments==2.0.2 -sphinx +furo +Sphinx>4 +sphinx-copybutton +sphinxext-opengraph sphinxcontrib-spelling pyenchant==3.0.1 sphinx-autobuild -divio-docs-theme datetime coverage django-cms From 7aeca24c6e218263fe3fa0d9ac8cfae453764057 Mon Sep 17 00:00:00 2001 From: Mark Walker Date: Fri, 18 Jun 2021 17:02:02 +0100 Subject: [PATCH 2/2] Tidy up some python 2 bits and commented out theme related config that isn't needed. --- docs/conf.py | 37 ++++--------------------------------- 1 file changed, 4 insertions(+), 33 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index f907a2e5493..86aeb25a785 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -63,8 +63,8 @@ current_year = datetime.datetime.now().year # General information about the project. -project = u'django cms' -copyright = u'2009-{}, Divio AG and contributors'.format(current_year) +project = 'django cms' +copyright = '2009-{}, Divio AG and contributors'.format(current_year) # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -140,37 +140,8 @@ except ImportError: html_theme = 'default' - show_cloud_banner = True -# The theme to use for HTML and HTML Help pages. Major themes that come with -# Sphinx are currently 'default' and 'sphinxdoc'. -# html_theme = 'default' - -# 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 = {} - -# Add any paths that contain custom themes here, relative to this directory. -#html_theme_path = [] - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -#html_title = None - -# A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -#html_logo = None - -# 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 - # 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". @@ -226,8 +197,8 @@ # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ('index', 'djangocms.tex', u'django cms Documentation', - u'Divio AG and contributors', 'manual'), + ('index', 'djangocms.tex', 'django cms Documentation', + 'Divio AG and contributors', 'manual'), ] # The name of an image file (relative to this directory) to place at the top