mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
[help] convert search_syntax.rst to help page
This commit is contained in:
parent
244ffef315
commit
532680be67
3 changed files with 36 additions and 40 deletions
|
@ -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>`
|
31
searx/help/en/search-syntax.md
Normal file
31
searx/help/en/search-syntax.md
Normal file
|
@ -0,0 +1,31 @@
|
|||
# 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 the language.
|
||||
|
||||
Abbrevations of the engines and languages are also accepted. Engine/category
|
||||
modifiers are chainable and inclusive (e.g. with [!it !ddg !wp
|
||||
qwer]($search?q=!it+!ddg+!wp+qwer)) search in IT category **and** duckduckgo
|
||||
**and** wikipedia for ``qwer``).
|
||||
|
||||
See the [preferences]($preferences) for the list of engines,
|
||||
categories and languages.
|
||||
|
||||
## Examples
|
||||
|
||||
Search in wikipedia for `qwer`:
|
||||
|
||||
* [!wp qwer]($search?q=!wp+qwer)
|
||||
* [!wikipedia qwer]($search?q=!wikipedia+qwer)
|
||||
|
||||
Image search:
|
||||
|
||||
* [!images Cthulu]($search?q=!images+Cthulu)
|
||||
|
||||
Custom language in wikipedia:
|
||||
|
||||
* [:hu !wp hackerspace]($search?q=:hu+!wp+hackerspace)
|
|
@ -18,7 +18,10 @@ class HelpPage(NamedTuple):
|
|||
|
||||
|
||||
# Whenever a new .md file is added to help/ it needs to be added here
|
||||
_TOC = ('about',)
|
||||
_TOC = (
|
||||
'about',
|
||||
'search-syntax',
|
||||
)
|
||||
|
||||
PAGES: Dict[str, HelpPage] = {}
|
||||
""" Maps a filename under help/ without the file extension to the rendered page. """
|
||||
|
@ -49,6 +52,7 @@ def render(app: flask.Flask):
|
|||
variables['index'] = url_for('index')
|
||||
variables['preferences'] = url_for('preferences')
|
||||
variables['stats'] = url_for('stats')
|
||||
variables['search'] = url_for('search')
|
||||
|
||||
for pagename in _TOC:
|
||||
filename = 'help/en/' + pagename + '.md'
|
||||
|
|
Loading…
Add table
Reference in a new issue