From fffbcef55c5337f996982749f30114330ee7f544 Mon Sep 17 00:00:00 2001 From: jacquesfize Date: Mon, 18 Nov 2024 14:56:56 +0100 Subject: [PATCH] feat(doc): change theme of the GeoNature documentation --- docs/conf.py | 30 +++++++++++++++--------------- docs/requirements.in | 2 +- docs/requirements.txt | 31 ++++++++++++++++++++++--------- 3 files changed, 38 insertions(+), 25 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 4a63e12b6c..6936d04bb6 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -44,7 +44,7 @@ ## AUTOAPI extensions.append("autoapi.extension") autoapi_dirs = ["../backend/geonature", "../backend/dependencies"] -autoapi_ignore = ["*migrations*", "*tests*"] +autoapi_ignore = ["*migrations*", "*tests*", "*celery_app.py"] autoapi_add_toctree_entry = False @@ -97,25 +97,25 @@ # 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 = "sphinx_book_theme" html_logo = "./images/LogoGeonature.jpg" # 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 = { - "canonical_url": "", - "logo_only": False, - "display_version": True, - "prev_next_buttons_location": "bottom", - "style_external_links": False, - "style_nav_header_background": "white", - # Toc options - "collapse_navigation": True, - "sticky_navigation": True, - "navigation_depth": 4, - "includehidden": True, - "titles_only": False, + # "canonical_url": "", + # "logo_only": False, + # "display_version": True, + # "prev_next_buttons_location": "bottom", + # "style_external_links": False, + # "style_nav_header_background": "white", + # # Toc options + # "collapse_navigation": True, + # "sticky_navigation": True, + "navigation_depth": 3, + # "includehidden": True, + # "titles_only": False, } # Add any paths that contain custom static files (such as style sheets) here, @@ -128,7 +128,7 @@ # # This is required for the alabaster theme # refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars -html_sidebars = {"**": ["globaltoc.html", "relations.html", "sourcelink.html", "searchbox.html"]} +# html_sidebars = {"**": ["globaltoc.html", "relations.html", "sourcelink.html", "searchbox.html"]} # html_sidebars = { # '**': [ # 'relations.html', # needs 'show_related': True theme option to display diff --git a/docs/requirements.in b/docs/requirements.in index 4768510911..ba2fc4bfca 100644 --- a/docs/requirements.in +++ b/docs/requirements.in @@ -1,4 +1,4 @@ sphinx -sphinx_rtd_theme +sphinx-book-theme myst-parser sphinx-autoapi \ No newline at end of file diff --git a/docs/requirements.txt b/docs/requirements.txt index 24aef6bf85..566459a632 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -4,12 +4,18 @@ # # pip-compile requirements.in # +accessible-pygments==0.0.5 + # via pydata-sphinx-theme alabaster==0.7.16 # via sphinx astroid==3.3.5 # via sphinx-autoapi babel==2.16.0 - # via sphinx + # via + # pydata-sphinx-theme + # sphinx +beautifulsoup4==4.12.3 + # via pydata-sphinx-theme certifi==2024.8.30 # via requests charset-normalizer==3.4.0 @@ -17,8 +23,8 @@ charset-normalizer==3.4.0 docutils==0.21.2 # via # myst-parser + # pydata-sphinx-theme # sphinx - # sphinx-rtd-theme idna==3.10 # via requests imagesize==1.4.1 @@ -44,8 +50,13 @@ myst-parser==3.0.1 # via -r requirements.in packaging==24.1 # via sphinx +pydata-sphinx-theme==0.16.0 + # via sphinx-book-theme pygments==2.18.0 - # via sphinx + # via + # accessible-pygments + # pydata-sphinx-theme + # sphinx pyyaml==6.0.2 # via # myst-parser @@ -54,16 +65,18 @@ requests==2.32.3 # via sphinx snowballstemmer==2.2.0 # via sphinx +soupsieve==2.6 + # via beautifulsoup4 sphinx==7.4.7 # via # -r requirements.in # myst-parser + # pydata-sphinx-theme # sphinx-autoapi - # sphinx-rtd-theme - # sphinxcontrib-jquery + # sphinx-book-theme sphinx-autoapi==3.3.3 # via -r requirements.in -sphinx-rtd-theme==3.0.1 +sphinx-book-theme==1.1.3 # via -r requirements.in sphinxcontrib-applehelp==2.0.0 # via sphinx @@ -71,8 +84,6 @@ sphinxcontrib-devhelp==2.0.0 # via sphinx sphinxcontrib-htmlhelp==2.1.0 # via sphinx -sphinxcontrib-jquery==4.1 - # via sphinx-rtd-theme sphinxcontrib-jsmath==1.0.1 # via sphinx sphinxcontrib-qthelp==2.0.0 @@ -84,7 +95,9 @@ stdlib-list==0.11.0 tomli==2.0.2 # via sphinx typing-extensions==4.12.2 - # via astroid + # via + # astroid + # pydata-sphinx-theme urllib3==2.2.3 # via requests zipp==3.20.2