diff options
| author | Markus Heiser <markus.heiser@darmarit.de> | 2021-12-23 09:12:38 +0100 |
|---|---|---|
| committer | Markus Heiser <markus.heiser@darmarIT.de> | 2026-05-07 16:19:28 +0200 |
| commit | 2f72fc4df2e108c219c1ce91e845e26d102a4f5c (patch) | |
| tree | 1ac0d00a7d640b8303bba325227758ccb7a37405 /docs/conf.py | |
| parent | 130cea600ddaba8b2e4aa02c7c3508ccdb3b837b (diff) | |
[docs] switch sphinx theme from pallets to furo (#3408)
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'docs/conf.py')
| -rw-r--r-- | docs/conf.py | 54 |
1 files changed, 20 insertions, 34 deletions
diff --git a/docs/conf.py b/docs/conf.py index e9d9db846..b976f0209 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,8 +1,7 @@ # SPDX-License-Identifier: AGPL-3.0-or-later -import sys, os +import sys, os from pathlib import Path -from pallets_sphinx_themes import ProjectLink from searx import get_setting from searx.version import VERSION_STRING, GIT_URL, GIT_BRANCH @@ -98,7 +97,6 @@ extlinks['pull-searx'] = ('https://github.com/searx/searx/pull/%s', 'PR %s') extlinks['origin'] = (GIT_URL + '/blob/' + GIT_BRANCH + '/%s', 'git://%s') extlinks['patch'] = (GIT_URL + '/commit/%s', '#%s') extlinks['docs'] = (DOCS_URL + '/%s', 'docs: %s') -extlinks['pypi'] = ('https://pypi.org/project/%s', 'PyPi: %s') extlinks['man'] = ('https://manpages.debian.org/jump?q=%s', '%s') #extlinks['role'] = ( # 'https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-%s', '') @@ -117,7 +115,6 @@ extensions = [ 'sphinx.ext.viewcode', "sphinx.ext.autodoc", "sphinx.ext.intersphinx", - "pallets_sphinx_themes", "sphinx_issues", # https://github.com/sloria/sphinx-issues/blob/master/README.rst "sphinx_jinja", # https://github.com/tardyp/sphinx-jinja "sphinxcontrib.programoutput", # https://github.com/NextThought/sphinxcontrib-programoutput @@ -158,15 +155,29 @@ issues_github_path = "searxng/searxng" # HTML ----------------------------------------------------------------- +html_theme = "furo" + +html_sidebars = { + "**": [ + "sidebar/scroll-start.html", + "sidebar/brand.html", + "sidebar/search.html", + "sidebar/navigation.html", + "sidebar/ethical-ads.html", + "sidebar/scroll-end.html", + ] +} + +html_static_path = ['_static'] + +html_css_files = [ + 'searxng.css', +] + # https://searxng.github.io/searxng --> '/searxng/' # https://docs.searxng.org --> '/' notfound_urls_prefix = '/' -sys.path.append(os.path.abspath('_themes')) -sys.path.insert(0, os.path.abspath("../")) -html_theme_path = ['_themes'] -html_theme = "searxng" - # sphinx.ext.imgmath setup html_math_renderer = 'imgmath' imgmath_image_format = 'svg' @@ -174,31 +185,6 @@ imgmath_font_size = 14 # sphinx.ext.imgmath setup END html_show_sphinx = False -html_theme_options = {"index_sidebar_logo": True} -html_context = {"project_links": [] } -html_context["project_links"].append(ProjectLink("Source", GIT_URL + '/tree/' + GIT_BRANCH)) - -if WIKI_URL: - html_context["project_links"].append(ProjectLink("Wiki", WIKI_URL)) -if PUBLIC_INSTANCES: - html_context["project_links"].append(ProjectLink("Public instances", PUBLIC_INSTANCES)) -if ISSUE_URL: - html_context["project_links"].append(ProjectLink("Issue Tracker", ISSUE_URL)) -if PRIVACYPOLICY_URL: - html_context["project_links"].append(ProjectLink("Privacy Policy", PRIVACYPOLICY_URL)) -if CONTACT_URL: - html_context["project_links"].append(ProjectLink("Contact", CONTACT_URL)) - -html_sidebars = { - "**": [ - "globaltoc.html", - "project.html", - "relations.html", - "searchbox.html", - "sourcelink.html" - ], -} -singlehtml_sidebars = {"index": ["project.html", "localtoc.html"]} html_logo = "../client/simple/src/brand/searxng-wordmark.svg" html_title = "SearXNG Documentation ({})".format(VERSION_STRING) html_show_sourcelink = True |
