[mod] typification of SearXNG: add new result type Code
This patch adds a new result type: Code - Python class: searx/result_types/code.py - Jinja template: searx/templates/simple/result_templates/code.html - CSS (less) client/simple/src/less/result_types/code.less Signed-of-by: Markus Heiser <markus.heiser@darmarIT.de>
This commit is contained in:
committed by
Markus Heiser
parent
b8085d27ac
commit
9ac9c8c4f5
@@ -469,33 +469,6 @@ links : :py:class:`dict`
|
||||
Additional links in the form of ``{'link_name': 'http://example.com'}``
|
||||
|
||||
|
||||
.. _template code:
|
||||
|
||||
``code.html``
|
||||
-------------
|
||||
|
||||
Displays result fields from:
|
||||
|
||||
- :ref:`macro result_header` and
|
||||
- :ref:`macro result_sub_header`
|
||||
|
||||
Additional fields used in the :origin:`code.html
|
||||
<searx/templates/simple/result_templates/code.html>`:
|
||||
|
||||
content : :py:class:`str`
|
||||
Description of the code fragment.
|
||||
|
||||
codelines : ``[line1, line2, ...]``
|
||||
Lines of the code fragment.
|
||||
|
||||
code_language : :py:class:`str`
|
||||
Name of the code language, the value is passed to
|
||||
:py:obj:`pygments.lexers.get_lexer_by_name`.
|
||||
|
||||
repository : :py:class:`str`
|
||||
URL of the repository of the code fragment.
|
||||
|
||||
|
||||
.. _template files:
|
||||
|
||||
``files.html``
|
||||
|
||||
Reference in New Issue
Block a user