summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarIT.de>2022-03-13 23:12:46 +0100
committerGitHub <noreply@github.com>2022-03-13 23:12:46 +0100
commitcd92a7eacdd6b4c333e57111e1503b8455628067 (patch)
treea2f72a42d2024c1f612bee5f9058920c643e6878 /docs
parente847313007aa3a61c26acda122bb183df1df76a7 (diff)
parent1157462ff9fc08504297e259356ccbefb339965f (diff)
Merge pull request #930 from return42/merge-user-doc2
Integrate the user documentation into the application
Diffstat (limited to 'docs')
-rw-r--r--docs/_themes/searxng/static/searxng.css2
-rw-r--r--docs/conf.py8
-rw-r--r--docs/index.rst1
-rw-r--r--docs/own-instance.rst (renamed from docs/user/own-instance.rst)0
-rw-r--r--docs/src/searx.infopage.rst8
-rw-r--r--docs/user/.gitignore1
-rw-r--r--docs/user/index.rst15
-rw-r--r--docs/user/search_syntax.rst39
8 files changed, 26 insertions, 48 deletions
diff --git a/docs/_themes/searxng/static/searxng.css b/docs/_themes/searxng/static/searxng.css
index 64f6d4700..1ab8489ec 100644
--- a/docs/_themes/searxng/static/searxng.css
+++ b/docs/_themes/searxng/static/searxng.css
@@ -14,7 +14,7 @@ p.version-warning {
background-color: #004b6b;
}
-div.sidebar {
+aside.sidebar {
background-color: whitesmoke;
border-color: lightsteelblue;
border-radius: 3pt;
diff --git a/docs/conf.py b/docs/conf.py
index 2f58bdb12..1dd5693ca 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -35,7 +35,7 @@ master_doc = "index"
source_suffix = '.rst'
numfig = True
-exclude_patterns = ['build-templates/*.rst']
+exclude_patterns = ['build-templates/*.rst', 'user/*.md']
import searx.engines
import searx.plugins
@@ -94,7 +94,6 @@ extlinks['pull-searx'] = ('https://github.com/searx/searx/pull/%s', 'PR ')
# links to custom brand
extlinks['origin'] = (GIT_URL + '/blob/' + GIT_BRANCH + '/%s', 'git://')
extlinks['patch'] = (GIT_URL + '/commit/%s', '#')
-extlinks['search'] = (SEARXNG_URL + '/%s', '#')
extlinks['docs'] = (DOCS_URL + '/%s', 'docs: ')
extlinks['pypi'] = ('https://pypi.org/project/%s', 'PyPi: ')
extlinks['man'] = ('https://manpages.debian.org/jump?q=%s', '')
@@ -117,14 +116,17 @@ extensions = [
"sphinx.ext.intersphinx",
"pallets_sphinx_themes",
"sphinx_issues", # https://github.com/sloria/sphinx-issues/blob/master/README.rst
- "sphinxcontrib.jinja", # https://github.com/tardyp/sphinx-jinja
+ "sphinx_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
+ 'myst_parser', # https://www.sphinx-doc.org/en/master/usage/markdown.html
]
+suppress_warnings = ['myst.domains']
+
intersphinx_mapping = {
"python": ("https://docs.python.org/3/", None),
"flask": ("https://flask.palletsprojects.com/", None),
diff --git a/docs/index.rst b/docs/index.rst
index f9800f95b..b836f4b4c 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -31,6 +31,7 @@ If you don't trust anyone, you can set up your own, see :ref:`installation`.
:caption: Contents
user/index
+ own-instance
admin/index
dev/index
utils/index
diff --git a/docs/user/own-instance.rst b/docs/own-instance.rst
index c53f28307..c53f28307 100644
--- a/docs/user/own-instance.rst
+++ b/docs/own-instance.rst
diff --git a/docs/src/searx.infopage.rst b/docs/src/searx.infopage.rst
new file mode 100644
index 000000000..243e5b0bd
--- /dev/null
+++ b/docs/src/searx.infopage.rst
@@ -0,0 +1,8 @@
+.. _searx.infopage:
+
+================
+Online ``/info``
+================
+
+.. automodule:: searx.infopage
+ :members:
diff --git a/docs/user/.gitignore b/docs/user/.gitignore
new file mode 100644
index 000000000..2e1fa2d52
--- /dev/null
+++ b/docs/user/.gitignore
@@ -0,0 +1 @@
+*.md \ No newline at end of file
diff --git a/docs/user/index.rst b/docs/user/index.rst
index 96d11bf8a..dc9fb0da2 100644
--- a/docs/user/index.rst
+++ b/docs/user/index.rst
@@ -2,9 +2,14 @@
User documentation
==================
-.. toctree::
- :maxdepth: 2
- :caption: Contents
+.. contents:: Contents
+ :depth: 3
+ :local:
+ :backlinks: entry
+
+
+.. _search-syntax:
+
+.. include:: search-syntax.md
+ :parser: myst_parser.sphinx_
- search_syntax
- own-instance
diff --git a/docs/user/search_syntax.rst b/docs/user/search_syntax.rst
deleted file mode 100644
index 346b3162d..000000000
--- a/docs/user/search_syntax.rst
+++ /dev/null
@@ -1,39 +0,0 @@
-
-.. _search-syntax:
-
-=============
-Search syntax
-=============
-
-SearXNG allows you to modify the default categories, engines and search language
-via the search query.
-
-Prefix ``!``
- to set Category/engine
-
-Prefix: ``:``
- to set language
-
-Abbrevations of the engines and languages are also accepted. Engine/category
-modifiers are chainable and inclusive (e.g. with :search:`!it !ddg !wp qwer
-<?q=%21it%20%21ddg%20%21wp%20qwer>` search in IT category **and** duckduckgo
-**and** wikipedia for ``qwer``).
-
-See the :search:`/preferences page <preferences>` for the list of engines,
-categories and languages.
-
-Examples
-========
-
-Search in wikipedia for ``qwer``:
-
-- :search:`!wp qwer <?q=%21wp%20qwer>` or
-- :search:`!wikipedia qwer :search:<?q=%21wikipedia%20qwer>`
-
-Image search:
-
-- :search:`!images Cthulhu <?q=%21images%20Cthulhu>`
-
-Custom language in wikipedia:
-
-- :search:`:hu !wp hackerspace <?q=%3Ahu%20%21wp%20hackerspace>`