From ae5338fed945d4632868328883294333ae00b676 Mon Sep 17 00:00:00 2001 From: Sebastian Gsell Date: Tue, 30 Apr 2024 12:39:21 +0200 Subject: [PATCH] Switch to furo theme --- docs/rtd_environment.yml | 1 + docs/source/conf.py | 81 ++++++++++++++++++++++++++++------------ 2 files changed, 58 insertions(+), 24 deletions(-) diff --git a/docs/rtd_environment.yml b/docs/rtd_environment.yml index 4bc8b6cbc..52f5db51c 100644 --- a/docs/rtd_environment.yml +++ b/docs/rtd_environment.yml @@ -17,6 +17,7 @@ dependencies: - ipython_genutils - myst-nb - pydata-sphinx-theme + - furo - pybaum - matplotlib - seaborn diff --git a/docs/source/conf.py b/docs/source/conf.py index 44d7889a8..3d4686fab 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -130,6 +130,7 @@ # The name of the Pygments (syntax highlighting) style to use. pygments_style = "sphinx" +# pygments_dark_style = "monokai" # If true, `todo` and `todoList` produce output, else they produce nothing. if on_rtd: @@ -158,34 +159,66 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = "pydata_sphinx_theme" +html_theme = "furo" -html_logo = "_static/images/estimagic_icon.svg" +html_css_files = ["css/custom.css"] -html_theme_options = { - "github_url": "https://github.com/OpenSourceEconomics/estimagic", - "logo": { - "text": "estimagic", - "image_dark": "_static/images/estimagic_icon_dark_mode.svg", - }, -} +# html_theme_options = { +# "github_url": "https://github.com/OpenSourceEconomics/estimagic", +# "logo": { +# "text": "estimagic", +# "image_dark": "_static/images/estimagic_icon_dark_mode.svg", +# }, +# } + + +# # 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". +# # html_static_path = ["_static"] + +# # Custom sidebar templates, must be a dictionary that maps document names +# # to template names. +# # +# # This is required for the alabaster theme +# # refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars +# html_sidebars = { +# "**": [ +# "relations.html", # needs 'show_related': True theme option to display +# "searchbox.html", +# ] +# } + +# 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". +# html_static_path = ["_static"] -html_css_files = ["css/custom.css"] +# If false, no module index is generated. +html_domain_indices = True +# If false, no index is generated. +html_use_index = True -# 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". -# html_static_path = ["_static"] +# If true, the index is split into individual pages for each letter. +html_split_index = False -# Custom sidebar templates, must be a dictionary that maps document names -# to template names. -# -# This is required for the alabaster theme -# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars -html_sidebars = { - "**": [ - "relations.html", # needs 'show_related': True theme option to display - "searchbox.html", - ] +# If true, links to the reST sources are added to the pages. +html_show_sourcelink = False + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +html_show_copyright = True + +html_title = "estimagic" + +html_theme_options = { + "sidebar_hide_name": True, + "navigation_with_keys": True, + # "light_logo": "_static/images/estimagic_icon.svg", + # "dark_logo": "_static/images/estimagic_icon_dark_mode.svg", + "light_logo": "_static/images/estimagic_logo", + "dark_logo": "_static/images/estimagic_logo_dark_mode", }