diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2020-12-21 00:37:45 +0100 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2021-01-11 22:12:38 +0100 |
commit | 9485179064b4eb28f2813eba3c295edca3b0db7f (patch) | |
tree | e9f5f003e9887aa130a3f19d82a1d9ace898504b /docs/conf.py | |
parent | dbfd5567aaa06a5f9792bb0839af74877ed5258c (diff) | |
download | searxng-9485179064b4eb28f2813eba3c295edca3b0db7f.tar.gz searxng-9485179064b4eb28f2813eba3c295edca3b0db7f.zip |
[mod] move brand options from Makefile to settings.yml
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'docs/conf.py')
-rw-r--r-- | docs/conf.py | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/docs/conf.py b/docs/conf.py index 0c07761a8..e467c6262 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -2,14 +2,10 @@ import sys, os from sphinx_build_tools import load_sphinx_config -from searx.version import VERSION_STRING from pallets_sphinx_themes import ProjectLink -from searx.brand import GIT_URL -GIT_BRANCH = os.environ.get("GIT_BRANCH", "master") -from searx.brand import SEARX_URL -from searx.brand import DOCS_URL - +from searx import brand +from searx.version import VERSION_STRING # Project -------------------------------------------------------------- @@ -46,10 +42,10 @@ extlinks['wiki'] = ('https://github.com/searx/searx/wiki/%s', ' ') extlinks['pull'] = ('https://github.com/searx/searx/pull/%s', 'PR ') # links to custom brand -extlinks['origin'] = (GIT_URL + '/blob/' + GIT_BRANCH + '/%s', 'git://') -extlinks['patch'] = (GIT_URL + '/commit/%s', '#') -extlinks['search'] = (SEARX_URL + '/%s', '#') -extlinks['docs'] = (DOCS_URL + '/%s', 'docs: ') +extlinks['origin'] = (brand.GIT_URL + '/blob/' + brand.GIT_BRANCH + '/%s', 'git://') +extlinks['patch'] = (brand.GIT_URL + '/commit/%s', '#') +extlinks['search'] = (brand.SEARX_URL + '/%s', '#') +extlinks['docs'] = (brand.DOCS_URL + '/%s', 'docs: ') extlinks['pypi'] = ('https://pypi.org/project/%s', 'PyPi: ') extlinks['man'] = ('https://manpages.debian.org/jump?q=%s', '') #extlinks['role'] = ( @@ -104,14 +100,20 @@ imgmath_font_size = 14 # sphinx.ext.imgmath setup END html_theme_options = {"index_sidebar_logo": True} -html_context = { - "project_links": [ - ProjectLink("Source", GIT_URL), - ProjectLink("Wiki", "https://github.com/searx/searx/wiki"), - ProjectLink("Public instances", "https://searx.space/"), - ProjectLink("Twitter", "https://twitter.com/Searx_engine"), - ] -} +html_context = {"project_links": [] } +if brand.GIT_URL: + html_context["project_links"].append(ProjectLink("Source", brand.GIT_URL)) +if brand.WIKI_URL: + html_context["project_links"].append(ProjectLink("Wiki", brand.WIKI_URL)) +if brand.PUBLIC_INSTANCES: + html_context["project_links"].append(ProjectLink("Public instances", brand.PUBLIC_INSTANCES)) +if brand.TWITTER_URL: + html_context["project_links"].append(ProjectLink("Twitter", brand.TWITTER_URL)) +if brand.ISSUE_URL: + html_context["project_links"].append(ProjectLink("Issue Tracker", brand.ISSUE_URL)) +if brand.CONTACT_URL: + html_context["project_links"].append(ProjectLink("Contact", brand.CONTACT_URL)) + html_sidebars = { "**": ["project.html", "relations.html", "searchbox.html"], } |