mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
[docs] switch sphinx theme from pallets to furo
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
0f70e4d305
commit
569da44ddd
5 changed files with 72 additions and 194 deletions
50
docs/_static/searxng.css
vendored
Normal file
50
docs/_static/searxng.css
vendored
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
|
||||||
|
aside.sidebar {
|
||||||
|
border-color: lightsteelblue;
|
||||||
|
border-radius: 3pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
p.sidebar-title, .sidebar p {
|
||||||
|
margin: 6pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar li,
|
||||||
|
.hlist li {
|
||||||
|
list-style-type: disclosure-closed;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sphinxsidebar .current > a {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* admonitions with (rendered) reST markup examples (:class: rst-example)
|
||||||
|
*
|
||||||
|
* .. admonition:: title of the example
|
||||||
|
* :class: rst-example
|
||||||
|
* ....
|
||||||
|
*/
|
||||||
|
|
||||||
|
div.rst-example {
|
||||||
|
background-color: inherit;
|
||||||
|
margin: 0;
|
||||||
|
border-top: none;
|
||||||
|
border-right: 1px solid #ccc;
|
||||||
|
border-bottom: none;
|
||||||
|
border-left: none;
|
||||||
|
border-radius: none;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.rst-example > p.admonition-title {
|
||||||
|
font-family: Sans Serif;
|
||||||
|
font-style: italic;
|
||||||
|
font-size: 0.8em;
|
||||||
|
display: block;
|
||||||
|
border-bottom: 1px solid #ccc;
|
||||||
|
padding: 0.5em 1em;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.sphinx-tabs {
|
||||||
|
clear: both;
|
||||||
|
}
|
151
docs/_themes/searxng/static/searxng.css
vendored
151
docs/_themes/searxng/static/searxng.css
vendored
|
@ -1,151 +0,0 @@
|
||||||
@import url("pocoo.css");
|
|
||||||
|
|
||||||
a, a.reference, a.footnote-reference {
|
|
||||||
color: #004b6b;
|
|
||||||
border-color: #004b6b;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:hover {
|
|
||||||
color: #6d4100;
|
|
||||||
border-color: #6d4100;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.version-warning {
|
|
||||||
background-color: #004b6b;
|
|
||||||
}
|
|
||||||
|
|
||||||
aside.sidebar {
|
|
||||||
background-color: whitesmoke;
|
|
||||||
border-color: lightsteelblue;
|
|
||||||
border-radius: 3pt;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.sphinxsidebar p.caption {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.sidebar-title, .sidebar p {
|
|
||||||
margin: 6pt;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar li,
|
|
||||||
.hlist li {
|
|
||||||
list-style-type: disclosure-closed;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sphinxsidebar .current > a {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* admonitions
|
|
||||||
*/
|
|
||||||
|
|
||||||
div.admonition, div.topic, nav.contents, div.toctree-wrapper {
|
|
||||||
background-color: #fafafa;
|
|
||||||
margin: 8px 0px;
|
|
||||||
padding: 1em;
|
|
||||||
border-radius: 3pt 0 0 3pt;
|
|
||||||
border-top: none;
|
|
||||||
border-right: none;
|
|
||||||
border-bottom: none;
|
|
||||||
border-left: 5pt solid #ccc;
|
|
||||||
list-style-type: disclosure-closed;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.toctree-wrapper p.caption {
|
|
||||||
font-weight: normal;
|
|
||||||
font-size: 24px;
|
|
||||||
margin: 0 0 10px 0;
|
|
||||||
padding: 0;
|
|
||||||
line-height: 1;
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.admonition-title:after {
|
|
||||||
content: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.admonition.hint { border-color: #416dc0b0; }
|
|
||||||
.admonition.note { border-color: #6c856cb0; }
|
|
||||||
.admonition.tip { border-color: #85c5c2b0; }
|
|
||||||
.admonition.attention { border-color: #ecec97b0; }
|
|
||||||
.admonition.caution { border-color: #a6c677b0; }
|
|
||||||
.admonition.danger { border-color: #d46262b0; }
|
|
||||||
.admonition.important { border-color: #dfa3a3b0; }
|
|
||||||
.admonition.error { border-color: red; }
|
|
||||||
.admonition.warning { border-color: darkred; }
|
|
||||||
|
|
||||||
.admonition.admonition-generic-admonition-title {
|
|
||||||
border-color: #416dc0b0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* admonitions with (rendered) reST markup examples (:class: rst-example)
|
|
||||||
*
|
|
||||||
* .. admonition:: title of the example
|
|
||||||
* :class: rst-example
|
|
||||||
* ....
|
|
||||||
*/
|
|
||||||
|
|
||||||
div.rst-example {
|
|
||||||
background-color: inherit;
|
|
||||||
margin: 0;
|
|
||||||
border-top: none;
|
|
||||||
border-right: 1px solid #ccc;
|
|
||||||
border-bottom: none;
|
|
||||||
border-left: none;
|
|
||||||
border-radius: none;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.rst-example > p.admonition-title {
|
|
||||||
font-family: Sans Serif;
|
|
||||||
font-style: italic;
|
|
||||||
font-size: 0.8em;
|
|
||||||
display: block;
|
|
||||||
border-bottom: 1px solid #ccc;
|
|
||||||
padding: 0.5em 1em;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* code block in figures
|
|
||||||
*/
|
|
||||||
|
|
||||||
div.highlight pre {
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Table theme
|
|
||||||
*/
|
|
||||||
|
|
||||||
thead, tfoot {
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
th:hover, td:hover {
|
|
||||||
background-color: #ffc;
|
|
||||||
}
|
|
||||||
|
|
||||||
thead th, tfoot th, tfoot td, tbody th {
|
|
||||||
background-color: #fffaef;
|
|
||||||
}
|
|
||||||
|
|
||||||
tbody tr:nth-child(odd) {
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
tbody tr:nth-child(even) {
|
|
||||||
background-color: #fafafa;
|
|
||||||
}
|
|
||||||
|
|
||||||
caption {
|
|
||||||
font-family: Sans Serif;
|
|
||||||
padding: 0.5em;
|
|
||||||
margin: 0.5em 0 0.5em 0;
|
|
||||||
caption-side: top;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.sphinx-tabs {
|
|
||||||
clear: both;
|
|
||||||
}
|
|
7
docs/_themes/searxng/theme.conf
vendored
7
docs/_themes/searxng/theme.conf
vendored
|
@ -1,7 +0,0 @@
|
||||||
[theme]
|
|
||||||
inherit = pocoo
|
|
||||||
stylesheet = searxng.css
|
|
||||||
|
|
||||||
[options]
|
|
||||||
touch_icon =
|
|
||||||
globaltoc_maxdepth = 5
|
|
56
docs/conf.py
56
docs/conf.py
|
@ -1,8 +1,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
import sys, os
|
import sys, os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from pallets_sphinx_themes import ProjectLink
|
|
||||||
|
|
||||||
from searx import get_setting
|
from searx import get_setting
|
||||||
from searx.version import VERSION_STRING, GIT_URL, GIT_BRANCH
|
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['origin'] = (GIT_URL + '/blob/' + GIT_BRANCH + '/%s', 'git://%s')
|
||||||
extlinks['patch'] = (GIT_URL + '/commit/%s', '#%s')
|
extlinks['patch'] = (GIT_URL + '/commit/%s', '#%s')
|
||||||
extlinks['docs'] = (DOCS_URL + '/%s', 'docs: %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['man'] = ('https://manpages.debian.org/jump?q=%s', '%s')
|
||||||
#extlinks['role'] = (
|
#extlinks['role'] = (
|
||||||
# 'https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-%s', '')
|
# 'https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-%s', '')
|
||||||
|
@ -117,7 +115,6 @@ extensions = [
|
||||||
'sphinx.ext.viewcode',
|
'sphinx.ext.viewcode',
|
||||||
"sphinx.ext.autodoc",
|
"sphinx.ext.autodoc",
|
||||||
"sphinx.ext.intersphinx",
|
"sphinx.ext.intersphinx",
|
||||||
"pallets_sphinx_themes",
|
|
||||||
"sphinx_issues", # https://github.com/sloria/sphinx-issues/blob/master/README.rst
|
"sphinx_issues", # https://github.com/sloria/sphinx-issues/blob/master/README.rst
|
||||||
"sphinx_jinja", # https://github.com/tardyp/sphinx-jinja
|
"sphinx_jinja", # https://github.com/tardyp/sphinx-jinja
|
||||||
"sphinxcontrib.programoutput", # https://github.com/NextThought/sphinxcontrib-programoutput
|
"sphinxcontrib.programoutput", # https://github.com/NextThought/sphinxcontrib-programoutput
|
||||||
|
@ -155,15 +152,29 @@ issues_github_path = "searxng/searxng"
|
||||||
|
|
||||||
# HTML -----------------------------------------------------------------
|
# 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://searxng.github.io/searxng --> '/searxng/'
|
||||||
# https://docs.searxng.org --> '/'
|
# https://docs.searxng.org --> '/'
|
||||||
notfound_urls_prefix = '/'
|
notfound_urls_prefix = '/'
|
||||||
|
|
||||||
sys.path.append(os.path.abspath('_themes'))
|
|
||||||
sys.path.insert(0, os.path.abspath("../utils/"))
|
|
||||||
html_theme_path = ['_themes']
|
|
||||||
html_theme = "searxng"
|
|
||||||
|
|
||||||
# sphinx.ext.imgmath setup
|
# sphinx.ext.imgmath setup
|
||||||
html_math_renderer = 'imgmath'
|
html_math_renderer = 'imgmath'
|
||||||
imgmath_image_format = 'svg'
|
imgmath_image_format = 'svg'
|
||||||
|
@ -171,33 +182,8 @@ imgmath_font_size = 14
|
||||||
# sphinx.ext.imgmath setup END
|
# sphinx.ext.imgmath setup END
|
||||||
|
|
||||||
html_show_sphinx = False
|
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 = "../src/brand/searxng-wordmark.svg"
|
html_logo = "../src/brand/searxng-wordmark.svg"
|
||||||
html_title = "SearXNG Documentation ({})".format(VERSION_STRING)
|
html_title = "SearXNG ({})".format(VERSION_STRING)
|
||||||
html_show_sourcelink = True
|
html_show_sourcelink = True
|
||||||
|
|
||||||
# LaTeX ----------------------------------------------------------------
|
# LaTeX ----------------------------------------------------------------
|
||||||
|
|
|
@ -5,12 +5,12 @@ black==24.3.0
|
||||||
pylint==3.1.0
|
pylint==3.1.0
|
||||||
splinter==0.21.0
|
splinter==0.21.0
|
||||||
selenium==4.19.0
|
selenium==4.19.0
|
||||||
Pallets-Sphinx-Themes==2.1.1
|
|
||||||
Sphinx<=7.1.2; python_version == '3.8'
|
Sphinx<=7.1.2; python_version == '3.8'
|
||||||
Sphinx==7.2.6; python_version > '3.8'
|
Sphinx==7.2.6; python_version > '3.8'
|
||||||
sphinx-issues==4.1.0
|
sphinx-issues==4.1.0
|
||||||
sphinx-jinja==2.0.2
|
sphinx-jinja==2.0.2
|
||||||
sphinx-tabs==3.4.5
|
sphinx-tabs==3.4.5
|
||||||
|
furo==2024.1.29
|
||||||
sphinxcontrib-programoutput==0.17
|
sphinxcontrib-programoutput==0.17
|
||||||
sphinx-autobuild==2021.3.14
|
sphinx-autobuild==2021.3.14
|
||||||
sphinx-notfound-page==1.0.0
|
sphinx-notfound-page==1.0.0
|
||||||
|
|
Loading…
Add table
Reference in a new issue