docs: use custom html theme
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Thu, 21 Jan 2021 14:11:24 +0000 (15:11 +0100)
committerMarge Bot <emma+marge@anholt.net>
Wed, 26 Apr 2023 22:45:41 +0000 (22:45 +0000)
This uses the new custom HTML theme for Sphinx, so our documentation
looks similar to our website.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8399>

docs/conf.py
docs/gitlab-ci.yml
docs/index.rst

index edee6d9..75c2892 100644 (file)
@@ -1,8 +1,6 @@
 #!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 
-import sphinx_rtd_theme
-
 #
 # The Mesa 3D Graphics Library documentation build configuration file, created by
 # sphinx-quickstart on Wed Mar 29 14:08:51 2017.
@@ -39,6 +37,7 @@ sys.path.append(os.path.abspath('_exts'))
 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
 # ones.
 extensions = [
+    'bootstrap',
     'breathe',
     'formatting',
     'nir',
@@ -64,7 +63,7 @@ copyright = '1995-2018, Brian Paul'
 author = 'Brian Paul'
 html_show_copyright = False
 
-html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
+html_theme_path = ['.']
 
 # The version info for the project you're documenting, acts as replacement for
 # |version| and |release|, also used in various other places throughout the
@@ -87,9 +86,6 @@ language = 'en'
 # This patterns also effect to html_static_path and html_extra_path
 exclude_patterns = []
 
-# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
-
 # If true, `todo` and `todoList` produce output, else they produce nothing.
 todo_include_todos = False
 
@@ -104,27 +100,10 @@ default_role = 'c:expr'
 # The theme to use for HTML and HTML Help pages.  See the documentation for
 # a list of builtin themes.
 #
-html_theme = 'sphinx_rtd_theme'
+html_theme = 'mesa3d_theme'
 
 html_favicon = 'favicon.ico'
 
-# 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 = {
-  'display_version': False,
-}
-
-html_context = {
-  'display_gitlab': True,
-  'gitlab_host': 'gitlab.freedesktop.org',
-  'gitlab_user': 'mesa',
-  'gitlab_repo': 'mesa',
-  'gitlab_version': 'main',
-  'conf_py_path': '/docs/',
-}
-
 html_copy_source = False
 
 # Add any paths that contain custom static files (such as style sheets) here,
index ba4527a..b08c060 100644 (file)
@@ -10,7 +10,7 @@
     - public/
   script:
   - apk --no-cache add graphviz doxygen
-  - pip3 install sphinx===5.1.1 breathe===4.34.0 mako===1.2.3 sphinx_rtd_theme===1.0.0
+  - pip3 install sphinx===5.1.1 breathe===4.34.0 mako===1.2.3
   - docs/doxygen-wrapper.py --out-dir=docs/doxygen_xml
   - sphinx-build -W -b $BUILDER docs public
 
index 8b468ef..30b333d 100644 (file)
@@ -137,10 +137,3 @@ Linux, FreeBSD, and other operating systems.
    OpenGL Website <https://www.opengl.org>
    DRI Website <https://dri.freedesktop.org>
    Developer Blogs <https://planet.freedesktop.org>
-
-.. toctree::
-   :maxdepth: 1
-   :caption: Hosted by:
-   :hidden:
-
-   freedesktop.org <https://www.freedesktop.org>