4from sphinx_build_tools import load_sphinx_config
5from searx.version import VERSION_STRING
6from pallets_sphinx_themes import ProjectLink
8from searx.brand import GIT_URL
9GIT_BRANCH = os.environ.get("GIT_BRANCH", "master")
10from searx.brand import SEARX_URL
11from searx.brand import DOCS_URL
14# Project --------------------------------------------------------------
17copyright = u'2015-2020, Adam Tauber, Noémi Ványi'
18author = u'Adam Tauber'
19release, version = VERSION_STRING, VERSION_STRING
20highlight_language = 'none'
22# General --------------------------------------------------------------
28exclude_patterns = ['build-templates/*.rst']
30from searx import webapp
32searx.engines.initialize_engines(searx.settings['engines'])
34 'webapp': dict(**webapp.__dict__),
35 'engines': searx.engines.engines
38# usage:: lorem :patch:`f373169` ipsum
42extlinks['wiki'] = ('https://github.com/searx/searx/wiki/%s', ' ')
43extlinks['pull'] = ('https://github.com/searx/searx/pull/%s', 'PR ')
45# links to custom brand
46extlinks['origin'] = (GIT_URL + '/blob/' + GIT_BRANCH + '/%s', 'git://')
47extlinks['patch'] = (GIT_URL + '/commit/%s', '#')
48extlinks['search'] = (SEARX_URL + '/%s', '#')
49extlinks['docs'] = (DOCS_URL + '/%s', 'docs: ')
50extlinks['pypi'] = ('https://pypi.org/project/%s', 'PyPi: ')
51extlinks['man'] = ('https://manpages.debian.org/jump?q=%s', '')
53# 'https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-%s', '')
55 'http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#%s', '')
57 'http://docutils.sourceforge.net/docs/ref/rst/roles.html#%s', '')
59 'http://docutils.sourceforge.net/docs/ref/rst/directives.html#%s', '')
61 'https://ctan.org/pkg/%s', 'CTAN: ')
65 'sphinx.ext.extlinks',
66 'sphinx.ext.viewcode',
68 "sphinx.ext.intersphinx",
69 "pallets_sphinx_themes",
70 "sphinx_issues", # https://github.com/sloria/sphinx-issues/blob/master/README.rst
71 "sphinxcontrib.jinja", # https://github.com/tardyp/sphinx-jinja
72 "sphinxcontrib.programoutput", # https://github.com/NextThought/sphinxcontrib-programoutput
73 'linuxdoc.kernel_include', # Implementation of the 'kernel-include' reST-directive.
74 'linuxdoc.rstFlatTable', # Implementation of the 'flat-table' reST-directive.
75 'linuxdoc.kfigure', # Sphinx extension which implements scalable image handling.
76 "sphinx_tabs.tabs", # https://github.com/djungelorm/sphinx-tabs
79intersphinx_mapping = {
80 "python": ("https://docs.python.org/3/", None),
81 "flask": ("https://flask.palletsprojects.com/", None),
82 # "werkzeug": ("https://werkzeug.palletsprojects.com/", None),
83 "jinja": ("https://jinja.palletsprojects.com/", None),
84 "linuxdoc" : ("https://return42.github.io/linuxdoc/", None),
85 "sphinx" : ("https://www.sphinx-doc.org/en/master/", None),
88issues_github_path = "searx/searx"
90# HTML -----------------------------------------------------------------
92sys.path.append(os.path.abspath('_themes'))
93html_theme_path = ['_themes']
96# sphinx.ext.imgmath setup
97html_math_renderer = 'imgmath'
98imgmath_image_format = 'svg'
100# sphinx.ext.imgmath setup END
102html_theme_options = {"index_sidebar_logo": True}
105 ProjectLink("Source", GIT_URL),
106 ProjectLink("Wiki", "https://github.com/searx/searx/wiki"),
107 ProjectLink("Public instances", "https://searx.space/"),
108 ProjectLink("Twitter", "https://twitter.com/Searx_engine"),
112 "**": ["project.html", "relations.html", "searchbox.html"],
114singlehtml_sidebars = {"index": ["project.html", "localtoc.html"]}
115html_static_path = ["static"]
116html_logo = "static/img/searx_logo_small.png"
117html_title = "Searx Documentation ({})".format("Searx-{}.tex".format(VERSION_STRING))
118html_show_sourcelink = False
120# LaTeX ----------------------------------------------------------------
123 (master_doc, "searx-{}.tex".format(VERSION_STRING), html_title, author, "manual")
126# ------------------------------------------------------------------------------
127# Since loadConfig overwrites settings from the global namespace, it has to be
128# the last statement in the conf.py file
129# ------------------------------------------------------------------------------
130load_sphinx_config(globals())
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list