summaryrefslogtreecommitdiff
path: root/docs/conf.py
diff options
context:
space:
mode:
authorNoémi Ványi <kvch@users.noreply.github.com>2020-06-28 20:28:12 +0200
committerGitHub <noreply@github.com>2020-06-28 20:28:12 +0200
commit93cbd85b8a5becdf69e6d70dd7c60f7122531262 (patch)
tree90d202af89e02fc3e83d5bdf4a924b05ff197261 /docs/conf.py
parent385e9b5c9e2d1caa73f99dac0bf1be1c46505121 (diff)
parentf9f5974968ce767c24eea8c8a651d0e3945fc01b (diff)
Merge branch 'master' into duckduckgo_correction
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 03e977aba..1f79e4c14 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -1,10 +1,12 @@
# -*- coding: utf-8 -*-
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
@@ -22,6 +24,8 @@ master_doc = "index"
source_suffix = '.rst'
numfig = True
+exclude_patterns = ['build-templates/*.rst']
+
from searx import webapp
jinja_contexts = {
'webapp': dict(**webapp.__dict__)
@@ -35,7 +39,7 @@ extlinks['wiki'] = ('https://github.com/asciimoo/searx/wiki/%s', ' ')
extlinks['pull'] = ('https://github.com/asciimoo/searx/pull/%s', 'PR ')
# links to custom brand
-extlinks['origin'] = (GIT_URL + '/blob/master/%s', 'git://')
+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: ')
@@ -61,6 +65,8 @@ extensions = [
"pallets_sphinx_themes",
"sphinx_issues", # https://github.com/sloria/sphinx-issues/blob/master/README.rst
"sphinxcontrib.jinja", # https://github.com/tardyp/sphinx-jinja
+ "sphinxcontrib.programoutput", # https://github.com/NextThought/sphinxcontrib-programoutput
+ 'linuxdoc.kernel_include', # Implementation of the 'kernel-include' reST-directive.
'linuxdoc.rstFlatTable', # Implementation of the 'flat-table' reST-directive.
'linuxdoc.kfigure', # Sphinx extension which implements scalable image handling.
"sphinx_tabs.tabs", # https://github.com/djungelorm/sphinx-tabs
@@ -112,3 +118,9 @@ html_show_sourcelink = False
latex_documents = [
(master_doc, "searx-{}.tex".format(VERSION_STRING), html_title, author, "manual")
]
+
+# ------------------------------------------------------------------------------
+# Since loadConfig overwrites settings from the global namespace, it has to be
+# the last statement in the conf.py file
+# ------------------------------------------------------------------------------
+load_sphinx_config(globals())