summaryrefslogtreecommitdiff
path: root/docs/conf.py
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2019-12-04 16:48:36 +0100
committerMarkus Heiser <markus.heiser@darmarit.de>2019-12-12 12:39:38 +0100
commitaf2cae6d1d71859e867a9fbc5da604ef6a898794 (patch)
tree648bcb7d4e23ad3a39696fad2585357f0c94dbd6 /docs/conf.py
parent25fa7da6c8276ed8958793e1b88071eab6b413f5 (diff)
downloadsearxng-af2cae6d1d71859e867a9fbc5da604ef6a898794.tar.gz
searxng-af2cae6d1d71859e867a9fbc5da604ef6a898794.zip
doc: make use of sphinx.ext.extlinks & sphinx.ext.intersphinx
- add sphinx extensions - patch documentation to make use of These modules help to simplify the reST markup of external references. BTW it helps to write more readable reST and form custom brands. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'docs/conf.py')
-rw-r--r--docs/conf.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/docs/conf.py b/docs/conf.py
index 1ad1b3b22..ee60e46e3 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -4,6 +4,9 @@ import sys, os
from searx.version import VERSION_STRING
from pallets_sphinx_themes import ProjectLink
+GIT_URL = os.environ.get("GIT_URL", "https://github.com/asciimoo/searx")
+SEARX_URL = os.environ.get("SEARX_URL", "https://searx.me")
+
# Project --------------------------------------------------------------
project = u'searx'
@@ -16,7 +19,16 @@ release, version = VERSION_STRING, VERSION_STRING
master_doc = "index"
source_suffix = '.rst'
+# usage:: lorem :patch:`f373169` ipsum
+
+extlinks = {}
+extlinks['origin'] = (GIT_URL + '/blob/master/%s', 'git://')
+extlinks['patch'] = (GIT_URL + '/commit/%s', '#')
+extlinks['search'] = (SEARX_URL + '/%s', '#')
+extlinks['wiki'] = ('https://github.com/asciimoo/searx/wiki/%s', ' ')
+
extensions = [
+ 'sphinx.ext.extlinks',
'sphinx.ext.viewcode',
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
@@ -43,7 +55,7 @@ html_theme = "searx"
html_theme_options = {"index_sidebar_logo": True}
html_context = {
"project_links": [
- ProjectLink("Source", os.environ.get("GIT_URL", "https://github.com/asciimoo")),
+ ProjectLink("Source", GIT_URL),
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"),