2015-11-17 22:13:30 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
2019-12-04 14:27:27 +00:00
|
|
|
import sys, os
|
|
|
|
from searx.version import VERSION_STRING
|
|
|
|
from pallets_sphinx_themes import ProjectLink
|
2015-11-17 22:13:30 +00:00
|
|
|
|
2019-12-04 15:48:36 +00:00
|
|
|
GIT_URL = os.environ.get("GIT_URL", "https://github.com/asciimoo/searx")
|
|
|
|
SEARX_URL = os.environ.get("SEARX_URL", "https://searx.me")
|
2019-12-13 13:57:07 +00:00
|
|
|
DOCS_URL = os.environ.get("DOCS_URL", "https://asciimoo.github.io/searx/")
|
2019-12-04 15:48:36 +00:00
|
|
|
|
2019-12-04 14:27:27 +00:00
|
|
|
# Project --------------------------------------------------------------
|
2015-11-17 22:13:30 +00:00
|
|
|
|
|
|
|
project = u'searx'
|
2019-10-23 11:06:19 +00:00
|
|
|
copyright = u'2015-2019, Adam Tauber, Noémi Ványi'
|
2015-11-17 22:13:30 +00:00
|
|
|
author = u'Adam Tauber'
|
2019-12-04 14:27:27 +00:00
|
|
|
release, version = VERSION_STRING, VERSION_STRING
|
2015-11-17 22:13:30 +00:00
|
|
|
|
2019-12-04 14:27:27 +00:00
|
|
|
# General --------------------------------------------------------------
|
2015-11-17 22:13:30 +00:00
|
|
|
|
2019-12-04 14:27:27 +00:00
|
|
|
master_doc = "index"
|
|
|
|
source_suffix = '.rst'
|
2015-11-17 22:13:30 +00:00
|
|
|
|
2019-12-04 15:48:36 +00:00
|
|
|
# usage:: lorem :patch:`f373169` ipsum
|
|
|
|
extlinks = {}
|
2019-12-12 18:20:56 +00:00
|
|
|
|
|
|
|
# upstream links
|
|
|
|
extlinks['wiki'] = ('https://github.com/asciimoo/searx/wiki/%s', ' ')
|
|
|
|
extlinks['pull'] = ('https://github.com/asciimoo/searx/pull/%s', 'PR ')
|
|
|
|
|
|
|
|
# links to custom brand
|
2019-12-04 15:48:36 +00:00
|
|
|
extlinks['origin'] = (GIT_URL + '/blob/master/%s', 'git://')
|
|
|
|
extlinks['patch'] = (GIT_URL + '/commit/%s', '#')
|
|
|
|
extlinks['search'] = (SEARX_URL + '/%s', '#')
|
2019-12-13 13:57:07 +00:00
|
|
|
extlinks['docs'] = (DOCS_URL + '/%s', 'docs: ')
|
2019-12-18 15:11:05 +00:00
|
|
|
extlinks['pypi'] = ('https://pypi.org/project/%s', 'PyPi: ')
|
2019-12-18 17:32:42 +00:00
|
|
|
extlinks['man'] = ('https://manpages.debian.org/jump?q=%s', '')
|
2019-12-04 15:48:36 +00:00
|
|
|
|
2019-12-04 14:27:27 +00:00
|
|
|
extensions = [
|
2019-12-04 15:48:36 +00:00
|
|
|
'sphinx.ext.extlinks',
|
2019-12-04 14:27:27 +00:00
|
|
|
'sphinx.ext.viewcode',
|
|
|
|
"sphinx.ext.autodoc",
|
|
|
|
"sphinx.ext.intersphinx",
|
|
|
|
"pallets_sphinx_themes",
|
|
|
|
"sphinx_issues", # https://github.com/sloria/sphinx-issues/blob/master/README.rst
|
|
|
|
]
|
2015-11-17 22:13:30 +00:00
|
|
|
|
2019-12-04 14:27:27 +00:00
|
|
|
intersphinx_mapping = {
|
|
|
|
"python": ("https://docs.python.org/3/", None),
|
|
|
|
# "flask": ("https://flask.palletsprojects.com/", None),
|
|
|
|
# "werkzeug": ("https://werkzeug.palletsprojects.com/", None),
|
|
|
|
# "jinja": ("https://jinja.palletsprojects.com/", None),
|
|
|
|
}
|
2015-11-17 22:13:30 +00:00
|
|
|
|
2019-12-04 14:27:27 +00:00
|
|
|
issues_github_path = "asciimoo/searx"
|
2015-11-17 22:13:30 +00:00
|
|
|
|
2019-12-04 14:27:27 +00:00
|
|
|
# HTML -----------------------------------------------------------------
|
2015-11-17 22:13:30 +00:00
|
|
|
|
|
|
|
sys.path.append(os.path.abspath('_themes'))
|
|
|
|
|
2019-12-04 14:27:27 +00:00
|
|
|
html_theme_path = ['_themes']
|
|
|
|
html_theme = "searx"
|
|
|
|
|
|
|
|
html_theme_options = {"index_sidebar_logo": True}
|
|
|
|
html_context = {
|
|
|
|
"project_links": [
|
2019-12-04 15:48:36 +00:00
|
|
|
ProjectLink("Source", GIT_URL),
|
2019-12-04 14:27:27 +00:00
|
|
|
ProjectLink("Wiki", "https://github.com/asciimoo/searx/wiki"),
|
|
|
|
ProjectLink("Public instances", "https://github.com/asciimoo/searx/wiki/Searx-instances"),
|
|
|
|
ProjectLink("Twitter", "https://twitter.com/Searx_engine"),
|
|
|
|
]
|
2015-11-17 22:13:30 +00:00
|
|
|
}
|
2019-12-04 14:27:27 +00:00
|
|
|
html_sidebars = {
|
|
|
|
"**": ["project.html", "relations.html", "searchbox.html"],
|
|
|
|
}
|
|
|
|
singlehtml_sidebars = {"index": ["project.html", "localtoc.html"]}
|
|
|
|
html_static_path = ["static"]
|
|
|
|
html_logo = "static/img/searx_logo_small.png"
|
|
|
|
html_title = "Searx Documentation ({})".format("Searx-{}.tex".format(VERSION_STRING))
|
|
|
|
html_show_sourcelink = False
|
2015-11-17 22:13:30 +00:00
|
|
|
|
2019-12-04 14:27:27 +00:00
|
|
|
# LaTeX ----------------------------------------------------------------
|
2015-11-17 22:13:30 +00:00
|
|
|
|
2019-12-04 14:27:27 +00:00
|
|
|
latex_documents = [
|
|
|
|
(master_doc, "searx-{}.tex".format(VERSION_STRING), html_title, author, "manual")
|
2015-11-17 22:13:30 +00:00
|
|
|
]
|