templates.html 61 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599
  1. <!DOCTYPE html>
  2. <html lang="en" data-content_root="../">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <title>Simple Theme Templates &#8212; SearXNG Documentation (2025.4.30+fd33559cf)</title>
  8. <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=6625fa76" />
  9. <link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" />
  10. <script src="../_static/documentation_options.js?v=b12b0e12"></script>
  11. <script src="../_static/doctools.js?v=9a2dae69"></script>
  12. <script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
  13. <script data-project="searxng" data-version="2025.4.30+fd33559cf" src="../_static/describe_version.js?v=fa7f30d0"></script>
  14. <link rel="index" title="Index" href="../genindex.html" />
  15. <link rel="search" title="Search" href="../search.html" />
  16. <link rel="next" title="Search API" href="search_api.html" />
  17. <link rel="prev" title="Infobox Results" href="result_types/infobox.html" />
  18. </head><body>
  19. <div class="related" role="navigation" aria-label="Related">
  20. <h3>Navigation</h3>
  21. <ul>
  22. <li class="right" style="margin-right: 10px">
  23. <a href="../genindex.html" title="General Index"
  24. accesskey="I">index</a></li>
  25. <li class="right" >
  26. <a href="../py-modindex.html" title="Python Module Index"
  27. >modules</a> |</li>
  28. <li class="right" >
  29. <a href="search_api.html" title="Search API"
  30. accesskey="N">next</a> |</li>
  31. <li class="right" >
  32. <a href="result_types/infobox.html" title="Infobox Results"
  33. accesskey="P">previous</a> |</li>
  34. <li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2025.4.30+fd33559cf)</a> &#187;</li>
  35. <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li>
  36. <li class="nav-item nav-item-this"><a href="">Simple Theme Templates</a></li>
  37. </ul>
  38. </div>
  39. <div class="document">
  40. <div class="documentwrapper">
  41. <div class="bodywrapper">
  42. <div class="body" role="main">
  43. <section id="simple-theme-templates">
  44. <span id="id1"></span><h1>Simple Theme Templates<a class="headerlink" href="#simple-theme-templates" title="Link to this heading">¶</a></h1>
  45. <p>The simple template is complex, it consists of many different elements and also
  46. uses macros and include statements. The following is a rough overview that we
  47. would like to give the developer at hand, details must still be taken from the
  48. <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/templates/simple/">sources</a>.</p>
  49. <p>A <a class="reference internal" href="result_types/index.html#result-types"><span class="std std-ref">result item</span></a> can be of different media types. The media
  50. type of a result is defined by the <code class="xref py py-obj docutils literal notranslate"><span class="pre">result_type.Result.template</span></code>. To
  51. set another media-type as <a class="reference internal" href="#template-default"><span class="std std-ref">default.html</span></a>, the field <code class="docutils literal notranslate"><span class="pre">template</span></code>
  52. in the result item must be set to the desired type.</p>
  53. <nav class="contents local" id="contents">
  54. <p class="topic-title">Contents</p>
  55. <ul class="simple">
  56. <li><p><a class="reference internal" href="#result-template-macros" id="id4">Result template macros</a></p>
  57. <ul>
  58. <li><p><a class="reference internal" href="#result-header" id="id5"><code class="docutils literal notranslate"><span class="pre">result_header</span></code></a></p></li>
  59. <li><p><a class="reference internal" href="#result-sub-header" id="id6"><code class="docutils literal notranslate"><span class="pre">result_sub_header</span></code></a></p></li>
  60. <li><p><a class="reference internal" href="#engine-data-form" id="id7"><code class="docutils literal notranslate"><span class="pre">engine_data_form</span></code></a></p></li>
  61. </ul>
  62. </li>
  63. <li><p><a class="reference internal" href="#main-result-list" id="id8">Main Result List</a></p>
  64. <ul>
  65. <li><p><a class="reference internal" href="#default-html" id="id9"><code class="docutils literal notranslate"><span class="pre">default.html</span></code></a></p></li>
  66. <li><p><a class="reference internal" href="#images-html" id="id10"><code class="docutils literal notranslate"><span class="pre">images.html</span></code></a></p></li>
  67. <li><p><a class="reference internal" href="#videos-html" id="id11"><code class="docutils literal notranslate"><span class="pre">videos.html</span></code></a></p></li>
  68. <li><p><a class="reference internal" href="#torrent-html" id="id12"><code class="docutils literal notranslate"><span class="pre">torrent.html</span></code></a></p></li>
  69. <li><p><a class="reference internal" href="#map-html" id="id13"><code class="docutils literal notranslate"><span class="pre">map.html</span></code></a></p></li>
  70. <li><p><a class="reference internal" href="#paper-html" id="id14"><code class="docutils literal notranslate"><span class="pre">paper.html</span></code></a></p></li>
  71. <li><p><a class="reference internal" href="#packages" id="id15"><code class="docutils literal notranslate"><span class="pre">packages</span></code></a></p></li>
  72. <li><p><a class="reference internal" href="#code-html" id="id16"><code class="docutils literal notranslate"><span class="pre">code.html</span></code></a></p></li>
  73. <li><p><a class="reference internal" href="#files-html" id="id17"><code class="docutils literal notranslate"><span class="pre">files.html</span></code></a></p></li>
  74. <li><p><a class="reference internal" href="#products-html" id="id18"><code class="docutils literal notranslate"><span class="pre">products.html</span></code></a></p></li>
  75. </ul>
  76. </li>
  77. <li><p><a class="reference internal" href="#answer-results" id="id19">Answer results</a></p></li>
  78. <li><p><a class="reference internal" href="#suggestion-results" id="id20">Suggestion results</a></p></li>
  79. <li><p><a class="reference internal" href="#correction-results" id="id21">Correction results</a></p></li>
  80. <li><p><a class="reference internal" href="#infobox-results" id="id22">Infobox results</a></p></li>
  81. </ul>
  82. </nav>
  83. <section id="result-template-macros">
  84. <span id="id2"></span><h2><a class="toc-backref" href="#id4" role="doc-backlink">Result template macros</a><a class="headerlink" href="#result-template-macros" title="Link to this heading">¶</a></h2>
  85. <section id="result-header">
  86. <span id="macro-result-header"></span><h3><a class="toc-backref" href="#id5" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">result_header</span></code></a><a class="headerlink" href="#result-header" title="Link to this heading">¶</a></h3>
  87. <p>Execpt <code class="docutils literal notranslate"><span class="pre">image.html</span></code> and some others this macro is used in nearly all result
  88. types in the <a class="reference internal" href="#main-result-list"><span class="std std-ref">Main Result List</span></a>.</p>
  89. <p>Fields used in the template <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/templates/simple/macros.html">macro result_header</a>:</p>
  90. <dl>
  91. <dt>url<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>Link URL of the result item.</p>
  92. </dd>
  93. <dt>title<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>Link title of the result item.</p>
  94. </dd>
  95. <dt>img_src, thumbnail<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>URL of a image or thumbnail that is displayed in the result item.</p>
  96. </dd>
  97. </dl>
  98. </section>
  99. <section id="result-sub-header">
  100. <span id="macro-result-sub-header"></span><h3><a class="toc-backref" href="#id6" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">result_sub_header</span></code></a><a class="headerlink" href="#result-sub-header" title="Link to this heading">¶</a></h3>
  101. <p>Execpt <code class="docutils literal notranslate"><span class="pre">image.html</span></code> and some others this macro is used in nearly all result
  102. types in the <a class="reference internal" href="#main-result-list"><span class="std std-ref">Main Result List</span></a>.</p>
  103. <p>Fields used in the template <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/templates/simple/macros.html">macro result_sub_header</a>:</p>
  104. <dl>
  105. <dt>publishedDate<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.datetime" title="(in Python v3.13)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">datetime.datetime</span></code></a></span></dt><dd><p>The date on which the object was published.</p>
  106. </dd>
  107. <dt>length: <a class="reference external" href="https://docs.python.org/3/library/time.html#time.struct_time" title="(in Python v3.13)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">time.struct_time</span></code></a></dt><dd><p>Playing duration in seconds.</p>
  108. </dd>
  109. <dt>views: <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></dt><dd><p>View count in humanized number format.</p>
  110. </dd>
  111. <dt>author<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>Author of the title.</p>
  112. </dd>
  113. <dt>metadata<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>Miscellaneous metadata.</p>
  114. </dd>
  115. </dl>
  116. </section>
  117. <section id="engine-data-form">
  118. <span id="engine-data"></span><h3><a class="toc-backref" href="#id7" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">engine_data_form</span></code></a><a class="headerlink" href="#engine-data-form" title="Link to this heading">¶</a></h3>
  119. <p>The <code class="docutils literal notranslate"><span class="pre">engine_data_form</span></code> macro is used in <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/templates/simple/results.html">results,html</a> in a HTML <code class="docutils literal notranslate"><span class="pre">&lt;form/&gt;</span></code> element. The
  120. intention of this macro is to pass data of a engine from one <a class="reference internal" href="engines/demo/demo_online.html#searx.engines.demo_online.response" title="searx.engines.demo_online.response"><code class="xref py py-obj docutils literal notranslate"><span class="pre">response</span></code></a> to the <a class="reference internal" href="../src/searx.search.html#searx.search.SearchQuery" title="searx.search.SearchQuery"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.search.SearchQuery</span></code></a>
  121. of the next <a class="reference internal" href="engines/demo/demo_online.html#searx.engines.demo_online.request" title="searx.engines.demo_online.request"><code class="xref py py-obj docutils literal notranslate"><span class="pre">request</span></code></a>.</p>
  122. <p>To pass data, engine’s response handler can append result items of typ
  123. <code class="docutils literal notranslate"><span class="pre">engine_data</span></code>. This is by example used to pass a token from the response to
  124. the next request:</p>
  125. <div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="k">def</span><span class="w"> </span><span class="nf">response</span><span class="p">(</span><span class="n">resp</span><span class="p">):</span>
  126. <span class="o">...</span>
  127. <span class="n">results</span><span class="o">.</span><span class="n">append</span><span class="p">({</span>
  128. <span class="s1">&#39;engine_data&#39;</span><span class="p">:</span> <span class="n">token</span><span class="p">,</span>
  129. <span class="s1">&#39;key&#39;</span><span class="p">:</span> <span class="s1">&#39;next_page_token&#39;</span><span class="p">,</span>
  130. <span class="p">})</span>
  131. <span class="o">...</span>
  132. <span class="k">return</span> <span class="n">results</span>
  133. <span class="k">def</span><span class="w"> </span><span class="nf">request</span><span class="p">(</span><span class="n">query</span><span class="p">,</span> <span class="n">params</span><span class="p">):</span>
  134. <span class="n">page_token</span> <span class="o">=</span> <span class="n">params</span><span class="p">[</span><span class="s1">&#39;engine_data&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">&#39;next_page_token&#39;</span><span class="p">)</span>
  135. </pre></div>
  136. </div>
  137. </section>
  138. </section>
  139. <section id="main-result-list">
  140. <span id="id3"></span><h2><a class="toc-backref" href="#id8" role="doc-backlink">Main Result List</a><a class="headerlink" href="#main-result-list" title="Link to this heading">¶</a></h2>
  141. <p>The <strong>media types</strong> of the <strong>main result type</strong> are the template files in
  142. the <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/templates/simple/result_templates">result_templates</a>.</p>
  143. <section id="default-html">
  144. <span id="template-default"></span><h3><a class="toc-backref" href="#id9" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">default.html</span></code></a><a class="headerlink" href="#default-html" title="Link to this heading">¶</a></h3>
  145. <p>Displays result fields from:</p>
  146. <ul class="simple">
  147. <li><p><a class="reference internal" href="#macro-result-header"><span class="std std-ref">result_header</span></a> and</p></li>
  148. <li><p><a class="reference internal" href="#macro-result-sub-header"><span class="std std-ref">result_sub_header</span></a></p></li>
  149. </ul>
  150. <p>Additional fields used in the <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/templates/simple/result_templates/default.html">default.html</a>:</p>
  151. <dl>
  152. <dt>content<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>General text of the result item.</p>
  153. </dd>
  154. <dt>iframe_src<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>URL of an embedded <code class="docutils literal notranslate"><span class="pre">&lt;iframe&gt;</span></code> / the frame is collapsible.</p>
  155. </dd>
  156. <dt>audio_src<span class="classifier">uri,</span></dt><dd><p>URL of an embedded <code class="docutils literal notranslate"><span class="pre">&lt;audio</span> <span class="pre">controls&gt;</span></code>.</p>
  157. </dd>
  158. </dl>
  159. </section>
  160. <section id="images-html">
  161. <span id="template-images"></span><h3><a class="toc-backref" href="#id10" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">images.html</span></code></a><a class="headerlink" href="#images-html" title="Link to this heading">¶</a></h3>
  162. <p>The images are displayed as small thumbnails in the main results list.</p>
  163. <dl>
  164. <dt>title<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>Title of the image.</p>
  165. </dd>
  166. <dt>thumbnail_src<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>URL of a preview of the image.</p>
  167. </dd>
  168. <dt>resolution <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></dt><dd><p>The resolution of the image (e.g. <code class="docutils literal notranslate"><span class="pre">1920</span> <span class="pre">x</span> <span class="pre">1080</span></code> pixel)</p>
  169. </dd>
  170. </dl>
  171. <section id="image-labels">
  172. <h4>Image labels<a class="headerlink" href="#image-labels" title="Link to this heading">¶</a></h4>
  173. <p>Clicking on the preview opens a gallery view in which all further metadata for
  174. the image is displayed. Addition fields used in the <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/templates/simple/result_templates/images.html">images.html</a>:</p>
  175. <dl>
  176. <dt>img_src<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>URL of the full size image.</p>
  177. </dd>
  178. <dt>content: <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></dt><dd><p>Description of the image.</p>
  179. </dd>
  180. <dt>author: <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></dt><dd><p>Name of the author of the image.</p>
  181. </dd>
  182. <dt>img_format<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>The format of the image (e.g. <code class="docutils literal notranslate"><span class="pre">png</span></code>).</p>
  183. </dd>
  184. <dt>source<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>Source of the image.</p>
  185. </dd>
  186. <dt>filesize: <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></dt><dd><p>Size of bytes in <code class="xref py py-obj docutils literal notranslate"><span class="pre">human</span> <span class="pre">readable</span></code> notation
  187. (e.g. <code class="docutils literal notranslate"><span class="pre">MB</span></code> for 1024 * 1024 Bytes filesize).</p>
  188. </dd>
  189. <dt>url<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>URL of the page from where the images comes from (source).</p>
  190. </dd>
  191. </dl>
  192. </section>
  193. </section>
  194. <section id="videos-html">
  195. <span id="template-videos"></span><h3><a class="toc-backref" href="#id11" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">videos.html</span></code></a><a class="headerlink" href="#videos-html" title="Link to this heading">¶</a></h3>
  196. <p>Displays result fields from:</p>
  197. <ul class="simple">
  198. <li><p><a class="reference internal" href="#macro-result-header"><span class="std std-ref">result_header</span></a> and</p></li>
  199. <li><p><a class="reference internal" href="#macro-result-sub-header"><span class="std std-ref">result_sub_header</span></a></p></li>
  200. </ul>
  201. <p>Additional fields used in the <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/templates/simple/result_templates/videos.html">videos.html</a>:</p>
  202. <dl>
  203. <dt>iframe_src<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>URL of an embedded <code class="docutils literal notranslate"><span class="pre">&lt;iframe&gt;</span></code> / the frame is collapsible.</p>
  204. <p>The videos are displayed as small thumbnails in the main results list, there
  205. is an additional button to collaps/open the embeded video.</p>
  206. </dd>
  207. <dt>content<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>Description of the code fragment.</p>
  208. </dd>
  209. </dl>
  210. </section>
  211. <section id="torrent-html">
  212. <span id="template-torrent"></span><h3><a class="toc-backref" href="#id12" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">torrent.html</span></code></a><a class="headerlink" href="#torrent-html" title="Link to this heading">¶</a></h3>
  213. <p>Displays result fields from:</p>
  214. <ul class="simple">
  215. <li><p><a class="reference internal" href="#macro-result-header"><span class="std std-ref">result_header</span></a> and</p></li>
  216. <li><p><a class="reference internal" href="#macro-result-sub-header"><span class="std std-ref">result_sub_header</span></a></p></li>
  217. </ul>
  218. <p>Additional fields used in the <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/templates/simple/result_templates/torrent.html">torrent.html</a>:</p>
  219. <dl>
  220. <dt>magnetlink:</dt><dd><p>URL of the <a class="reference external" href="https://en.wikipedia.org/wiki/Magnet_URI_scheme">magnet link</a>.</p>
  221. </dd>
  222. <dt>torrentfile</dt><dd><p>URL of the <a class="reference external" href="https://en.wikipedia.org/wiki/Torrent_file">torrent file</a>.</p>
  223. </dd>
  224. <dt>seed<span class="classifier"><code class="docutils literal notranslate"><span class="pre">int</span></code></span></dt><dd><p>Number of seeders.</p>
  225. </dd>
  226. <dt>leech<span class="classifier"><code class="docutils literal notranslate"><span class="pre">int</span></code></span></dt><dd><p>Number of leecher</p>
  227. </dd>
  228. <dt>filesize<span class="classifier"><code class="docutils literal notranslate"><span class="pre">int</span></code></span></dt><dd><p>Size in Bytes (rendered to human readable unit of measurement).</p>
  229. </dd>
  230. <dt>files<span class="classifier"><code class="docutils literal notranslate"><span class="pre">int</span></code></span></dt><dd><p>Number of files.</p>
  231. </dd>
  232. </dl>
  233. </section>
  234. <section id="map-html">
  235. <span id="template-map"></span><h3><a class="toc-backref" href="#id13" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">map.html</span></code></a><a class="headerlink" href="#map-html" title="Link to this heading">¶</a></h3>
  236. <p>Displays result fields from:</p>
  237. <ul class="simple">
  238. <li><p><a class="reference internal" href="#macro-result-header"><span class="std std-ref">result_header</span></a> and</p></li>
  239. <li><p><a class="reference internal" href="#macro-result-sub-header"><span class="std std-ref">result_sub_header</span></a></p></li>
  240. </ul>
  241. <p>Additional fields used in the <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/templates/simple/result_templates/map.html">map.html</a>:</p>
  242. <dl>
  243. <dt>content<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>Description of the item.</p>
  244. </dd>
  245. <dt>address_label<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>Label of the address / default <code class="docutils literal notranslate"><span class="pre">_('address')</span></code>.</p>
  246. </dd>
  247. <dt>geojson<span class="classifier"><a class="reference external" href="https://en.wikipedia.org/wiki/GeoJSON">GeoJSON</a></span></dt><dd><p>Geometries mapped to <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dataset">HTMLElement.dataset</a> (<code class="docutils literal notranslate"><span class="pre">data-map-geojson</span></code>) and used by
  248. <a class="reference external" href="https://github.com/Leaflet/Leaflet">Leaflet</a>.</p>
  249. </dd>
  250. <dt>boundingbox<span class="classifier"><code class="docutils literal notranslate"><span class="pre">[</span> <span class="pre">min-lon,</span> <span class="pre">min-lat,</span> <span class="pre">max-lon,</span> <span class="pre">max-lat]</span></code></span></dt><dd><p>A <a class="reference external" href="https://wiki.openstreetmap.org/wiki/Bounding_Box">bbox</a> area defined by min longitude , min latitude , max longitude and max
  251. latitude. The bounding box is mapped to <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dataset">HTMLElement.dataset</a>
  252. (<code class="docutils literal notranslate"><span class="pre">data-map-boundingbox</span></code>) and is used by <a class="reference external" href="https://github.com/Leaflet/Leaflet">Leaflet</a>.</p>
  253. </dd>
  254. <dt>longitude, latitude<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>Geographical coordinates, mapped to <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dataset">HTMLElement.dataset</a> (<code class="docutils literal notranslate"><span class="pre">data-map-lon</span></code>,
  255. <code class="docutils literal notranslate"><span class="pre">data-map-lat</span></code>) and is used by <a class="reference external" href="https://github.com/Leaflet/Leaflet">Leaflet</a>.</p>
  256. </dd>
  257. <dt>address<span class="classifier"><code class="docutils literal notranslate"><span class="pre">{...}</span></code></span></dt><dd><p>A dicticonary with the address data:</p>
  258. <div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">address</span> <span class="o">=</span> <span class="p">{</span>
  259. <span class="s1">&#39;name&#39;</span> <span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="c1"># name of object</span>
  260. <span class="s1">&#39;road&#39;</span> <span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="c1"># street name of object</span>
  261. <span class="s1">&#39;house_number&#39;</span> <span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="c1"># house number of object</span>
  262. <span class="s1">&#39;postcode&#39;</span> <span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="c1"># postcode of object</span>
  263. <span class="s1">&#39;country&#39;</span> <span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="c1"># country of object</span>
  264. <span class="s1">&#39;country_code&#39;</span> <span class="p">:</span> <span class="nb">str</span><span class="p">,</span>
  265. <span class="s1">&#39;locality&#39;</span> <span class="p">:</span> <span class="nb">str</span><span class="p">,</span>
  266. <span class="p">}</span>
  267. </pre></div>
  268. </div>
  269. <dl>
  270. <dt>country_code<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p><a class="reference external" href="https://wiki.openstreetmap.org/wiki/Country_code">Country code</a> of the object.</p>
  271. </dd>
  272. <dt>locality<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>The name of the city, town, township, village, borough, etc. in which this
  273. object is located.</p>
  274. </dd>
  275. </dl>
  276. </dd>
  277. <dt>links<span class="classifier"><code class="docutils literal notranslate"><span class="pre">[link1,</span> <span class="pre">link2,</span> <span class="pre">...]</span></code></span></dt><dd><p>A list of links with labels:</p>
  278. <div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">links</span><span class="o">.</span><span class="n">append</span><span class="p">({</span>
  279. <span class="s1">&#39;label&#39;</span> <span class="p">:</span> <span class="nb">str</span><span class="p">,</span>
  280. <span class="s1">&#39;url&#39;</span> <span class="p">:</span> <span class="nb">str</span><span class="p">,</span>
  281. <span class="s1">&#39;url_label&#39;</span> <span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="c1"># set by some engines but unused (oscar)</span>
  282. <span class="p">})</span>
  283. </pre></div>
  284. </div>
  285. </dd>
  286. <dt>data<span class="classifier"><code class="docutils literal notranslate"><span class="pre">[data1,</span> <span class="pre">data2,</span> <span class="pre">...]</span></code></span></dt><dd><p>A list of additional data, shown in two columns and containing a label and
  287. value.</p>
  288. <div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">data</span><span class="o">.</span><span class="n">append</span><span class="p">({</span>
  289. <span class="s1">&#39;label&#39;</span> <span class="p">:</span> <span class="nb">str</span><span class="p">,</span>
  290. <span class="s1">&#39;value&#39;</span> <span class="p">:</span> <span class="nb">str</span><span class="p">,</span>
  291. <span class="s1">&#39;key&#39;</span> <span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="c1"># set by some engines but unused</span>
  292. <span class="p">})</span>
  293. </pre></div>
  294. </div>
  295. </dd>
  296. <dt>type<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a> # set by some engines but unused (oscar)</span></dt><dd><p>Tag label from <a class="reference internal" href="searxng_extra/update.html#update-osm-keys-tags-py"><span class="std std-ref">OSM_KEYS_TAGS[‘tags’]</span></a>.</p>
  297. </dd>
  298. <dt>type_icon<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a> # set by some engines but unused (oscar)</span></dt><dd><p>Type’s icon.</p>
  299. </dd>
  300. <dt>osm<span class="classifier"><code class="docutils literal notranslate"><span class="pre">{...}</span></code></span></dt><dd><p>OSM-type and OSM-ID, can be used to <a class="reference external" href="https://nominatim.org/release-docs/latest/api/Lookup/">Lookup</a> OSM data (<a class="reference external" href="https://nominatim.org/release-docs/latest/">Nominatim</a>). There is
  301. also a discussion about “<a class="reference external" href="https://nominatim.org/release-docs/latest/api/Output/#place_id-is-not-a-persistent-id">place_id is not a persistent id</a>” and the
  302. <a class="reference external" href="https://wiki.openstreetmap.org/wiki/Permanent_ID">perma_id</a>.</p>
  303. <div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">osm</span> <span class="o">=</span> <span class="p">{</span>
  304. <span class="s1">&#39;type&#39;</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span>
  305. <span class="s1">&#39;id&#39;</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span>
  306. <span class="p">}</span>
  307. </pre></div>
  308. </div>
  309. <dl>
  310. <dt>type<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>Type of osm-object (if OSM-Result).</p>
  311. </dd>
  312. <dt>id :</dt><dd><p>ID of osm-object (if OSM-Result).</p>
  313. </dd>
  314. </dl>
  315. <div class="admonition hint">
  316. <p class="admonition-title">Hint</p>
  317. <p>The <code class="docutils literal notranslate"><span class="pre">osm</span></code> property is set by engine <code class="docutils literal notranslate"><span class="pre">openstreetmap.py</span></code>, but it is not
  318. used in the <code class="docutils literal notranslate"><span class="pre">map.html</span></code> template yet.</p>
  319. </div>
  320. </dd>
  321. </dl>
  322. </section>
  323. <section id="paper-html">
  324. <span id="template-paper"></span><h3><a class="toc-backref" href="#id14" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">paper.html</span></code></a><a class="headerlink" href="#paper-html" title="Link to this heading">¶</a></h3>
  325. <p>Displays result fields from:</p>
  326. <ul class="simple">
  327. <li><p><a class="reference internal" href="#macro-result-header"><span class="std std-ref">result_header</span></a></p></li>
  328. </ul>
  329. <p>Additional fields used in the <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/templates/simple/result_templates/paper.html">paper.html</a>:</p>
  330. <dl>
  331. <dt>content<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>An abstract or excerpt from the document.</p>
  332. </dd>
  333. <dt>comments<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>Free text display in italic below the content.</p>
  334. </dd>
  335. <dt>tags<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">List</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>]</span></dt><dd><p>Free tag list.</p>
  336. </dd>
  337. <dt>type<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>Short description of medium type, e.g. <em>book</em>, <em>pdf</em> or <em>html</em> …</p>
  338. </dd>
  339. <dt>authors<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">List</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>]</span></dt><dd><p>List of authors of the work (authors with a “s” suffix, the “author” is in the
  340. <a class="reference internal" href="#macro-result-sub-header"><span class="std std-ref">result_sub_header</span></a>).</p>
  341. </dd>
  342. <dt>editor<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>Editor of the book/paper.</p>
  343. </dd>
  344. <dt>publisher<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>Name of the publisher.</p>
  345. </dd>
  346. <dt>journal<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>Name of the journal or magazine the article was published in.</p>
  347. </dd>
  348. <dt>volume<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>Volume number.</p>
  349. </dd>
  350. <dt>pages<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>Page range where the article is.</p>
  351. </dd>
  352. <dt>number<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>Number of the report or the issue number for a journal article.</p>
  353. </dd>
  354. <dt>doi<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>DOI number (like <code class="docutils literal notranslate"><span class="pre">10.1038/d41586-018-07848-2</span></code>).</p>
  355. </dd>
  356. <dt>issn<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">List</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>]</span></dt><dd><p>ISSN number like <code class="docutils literal notranslate"><span class="pre">1476-4687</span></code></p>
  357. </dd>
  358. <dt>isbn<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">List</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>]</span></dt><dd><p>ISBN number like <code class="docutils literal notranslate"><span class="pre">9780201896831</span></code></p>
  359. </dd>
  360. <dt>pdf_url<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>URL to the full article, the PDF version</p>
  361. </dd>
  362. <dt>html_url<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>URL to full article, HTML version</p>
  363. </dd>
  364. </dl>
  365. </section>
  366. <section id="packages">
  367. <span id="template-packages"></span><h3><a class="toc-backref" href="#id15" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">packages</span></code></a><a class="headerlink" href="#packages" title="Link to this heading">¶</a></h3>
  368. <p>Displays result fields from:</p>
  369. <ul class="simple">
  370. <li><p><a class="reference internal" href="#macro-result-header"><span class="std std-ref">result_header</span></a></p></li>
  371. </ul>
  372. <p>Additional fields used in the <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/templates/simple/result_templates/packages.html">packages.html</a>:</p>
  373. <dl>
  374. <dt>package_name<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>The name of the package.</p>
  375. </dd>
  376. <dt>version<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>The current version of the package.</p>
  377. </dd>
  378. <dt>maintainer<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>The maintainer or author of the project.</p>
  379. </dd>
  380. <dt>publishedDate<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.datetime" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime</span></code></a></span></dt><dd><p>Date of latest update or release.</p>
  381. </dd>
  382. <dt>tags<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">List</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>]</span></dt><dd><p>Free tag list.</p>
  383. </dd>
  384. <dt>popularity<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>The popularity of the package, e.g. rating or download count.</p>
  385. </dd>
  386. <dt>license_name<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>The name of the license.</p>
  387. </dd>
  388. <dt>license_url<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>The web location of a license copy.</p>
  389. </dd>
  390. <dt>homepage<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>The url of the project’s homepage.</p>
  391. </dd>
  392. <dt>source_code_url: <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></dt><dd><p>The location of the project’s source code.</p>
  393. </dd>
  394. <dt>links<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></a></span></dt><dd><p>Additional links in the form of <code class="docutils literal notranslate"><span class="pre">{'link_name':</span> <span class="pre">'http://example.com'}</span></code></p>
  395. </dd>
  396. </dl>
  397. </section>
  398. <section id="code-html">
  399. <span id="template-code"></span><h3><a class="toc-backref" href="#id16" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">code.html</span></code></a><a class="headerlink" href="#code-html" title="Link to this heading">¶</a></h3>
  400. <p>Displays result fields from:</p>
  401. <ul class="simple">
  402. <li><p><a class="reference internal" href="#macro-result-header"><span class="std std-ref">result_header</span></a> and</p></li>
  403. <li><p><a class="reference internal" href="#macro-result-sub-header"><span class="std std-ref">result_sub_header</span></a></p></li>
  404. </ul>
  405. <p>Additional fields used in the <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/templates/simple/result_templates/code.html">code.html</a>:</p>
  406. <dl>
  407. <dt>content<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>Description of the code fragment.</p>
  408. </dd>
  409. <dt>codelines<span class="classifier"><code class="docutils literal notranslate"><span class="pre">[line1,</span> <span class="pre">line2,</span> <span class="pre">...]</span></code></span></dt><dd><p>Lines of the code fragment.</p>
  410. </dd>
  411. <dt>code_language<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>Name of the code language, the value is passed to
  412. <code class="xref py py-obj docutils literal notranslate"><span class="pre">pygments.lexers.get_lexer_by_name</span></code>.</p>
  413. </dd>
  414. <dt>repository<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>URL of the repository of the code fragment.</p>
  415. </dd>
  416. </dl>
  417. </section>
  418. <section id="files-html">
  419. <span id="template-files"></span><h3><a class="toc-backref" href="#id17" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">files.html</span></code></a><a class="headerlink" href="#files-html" title="Link to this heading">¶</a></h3>
  420. <p>Displays result fields from:</p>
  421. <ul class="simple">
  422. <li><p><a class="reference internal" href="#macro-result-header"><span class="std std-ref">result_header</span></a> and</p></li>
  423. <li><p><a class="reference internal" href="#macro-result-sub-header"><span class="std std-ref">result_sub_header</span></a></p></li>
  424. </ul>
  425. <p>Additional fields used in the <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/templates/simple/result_templates/files.html">code.html</a>:</p>
  426. <dl>
  427. <dt>filename, size, time: <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></dt><dd><p>Filename, Filesize and Date of the file.</p>
  428. </dd>
  429. <dt>mtype<span class="classifier"><code class="docutils literal notranslate"><span class="pre">audio</span></code> | <code class="docutils literal notranslate"><span class="pre">video</span></code> | <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>Mimetype type of the file.</p>
  430. </dd>
  431. <dt>subtype<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>Mimetype / subtype of the file.</p>
  432. </dd>
  433. <dt>abstract<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>Abstract of the file.</p>
  434. </dd>
  435. <dt>author<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>Name of the author of the file</p>
  436. </dd>
  437. <dt>embedded<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>URL of an embedded media type (<code class="docutils literal notranslate"><span class="pre">audio</span></code> or <code class="docutils literal notranslate"><span class="pre">video</span></code>) / is collapsible.</p>
  438. </dd>
  439. </dl>
  440. </section>
  441. <section id="products-html">
  442. <span id="template-products"></span><h3><a class="toc-backref" href="#id18" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">products.html</span></code></a><a class="headerlink" href="#products-html" title="Link to this heading">¶</a></h3>
  443. <p>Displays result fields from:</p>
  444. <ul class="simple">
  445. <li><p><a class="reference internal" href="#macro-result-header"><span class="std std-ref">result_header</span></a> and</p></li>
  446. <li><p><a class="reference internal" href="#macro-result-sub-header"><span class="std std-ref">result_sub_header</span></a></p></li>
  447. </ul>
  448. <p>Additional fields used in the <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/templates/simple/result_templates/products.html">products.html</a>:</p>
  449. <dl>
  450. <dt>content<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>Description of the product.</p>
  451. </dd>
  452. <dt>price<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>The price must include the currency.</p>
  453. </dd>
  454. <dt>shipping<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>Shipping details.</p>
  455. </dd>
  456. <dt>source_country<span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></span></dt><dd><p>Place from which the shipment is made.</p>
  457. </dd>
  458. </dl>
  459. </section>
  460. </section>
  461. <section id="answer-results">
  462. <span id="template-answer-results"></span><h2><a class="toc-backref" href="#id19" role="doc-backlink">Answer results</a><a class="headerlink" href="#answer-results" title="Link to this heading">¶</a></h2>
  463. <p>See <a class="reference internal" href="result_types/answer.html#result-types-answer"><span class="std std-ref">Answer Results</span></a></p>
  464. </section>
  465. <section id="suggestion-results">
  466. <h2><a class="toc-backref" href="#id20" role="doc-backlink">Suggestion results</a><a class="headerlink" href="#suggestion-results" title="Link to this heading">¶</a></h2>
  467. <p>See <a class="reference internal" href="result_types/suggestion.html#result-types-suggestion"><span class="std std-ref">Suggestion Results</span></a></p>
  468. </section>
  469. <section id="correction-results">
  470. <h2><a class="toc-backref" href="#id21" role="doc-backlink">Correction results</a><a class="headerlink" href="#correction-results" title="Link to this heading">¶</a></h2>
  471. <p>See <a class="reference internal" href="result_types/correction.html#result-types-corrections"><span class="std std-ref">Correction Results</span></a></p>
  472. </section>
  473. <section id="infobox-results">
  474. <h2><a class="toc-backref" href="#id22" role="doc-backlink">Infobox results</a><a class="headerlink" href="#infobox-results" title="Link to this heading">¶</a></h2>
  475. <p>See <a class="reference internal" href="result_types/infobox.html#result-types-infobox"><span class="std std-ref">Infobox Results</span></a></p>
  476. </section>
  477. </section>
  478. <div class="clearer"></div>
  479. </div>
  480. </div>
  481. </div>
  482. <span id="sidebar-top"></span>
  483. <div class="sphinxsidebar" role="navigation" aria-label="Main">
  484. <div class="sphinxsidebarwrapper">
  485. <p class="logo"><a href="../index.html">
  486. <img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/>
  487. </a></p>
  488. <h3><a href="../index.html">Table of Contents</a></h3>
  489. <ul class="current">
  490. <li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li>
  491. <li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
  492. <li class="toctree-l1"><a class="reference internal" href="../admin/index.html">Administrator documentation</a></li>
  493. <li class="toctree-l1 current"><a class="reference internal" href="index.html">Developer documentation</a><ul class="current">
  494. <li class="toctree-l2"><a class="reference internal" href="quickstart.html">Development Quickstart</a></li>
  495. <li class="toctree-l2"><a class="reference internal" href="rtm_asdf.html">Runtime Management</a></li>
  496. <li class="toctree-l2"><a class="reference internal" href="contribution_guide.html">How to contribute</a></li>
  497. <li class="toctree-l2"><a class="reference internal" href="extended_types.html">Extended Types</a></li>
  498. <li class="toctree-l2"><a class="reference internal" href="engines/index.html">Engine Implementations</a></li>
  499. <li class="toctree-l2"><a class="reference internal" href="result_types/index.html">Result Types</a></li>
  500. <li class="toctree-l2 current"><a class="current reference internal" href="#">Simple Theme Templates</a><ul>
  501. <li class="toctree-l3"><a class="reference internal" href="#result-template-macros">Result template macros</a><ul>
  502. <li class="toctree-l4"><a class="reference internal" href="#result-header"><code class="docutils literal notranslate"><span class="pre">result_header</span></code></a></li>
  503. <li class="toctree-l4"><a class="reference internal" href="#result-sub-header"><code class="docutils literal notranslate"><span class="pre">result_sub_header</span></code></a></li>
  504. <li class="toctree-l4"><a class="reference internal" href="#engine-data-form"><code class="docutils literal notranslate"><span class="pre">engine_data_form</span></code></a></li>
  505. </ul>
  506. </li>
  507. <li class="toctree-l3"><a class="reference internal" href="#main-result-list">Main Result List</a><ul>
  508. <li class="toctree-l4"><a class="reference internal" href="#default-html"><code class="docutils literal notranslate"><span class="pre">default.html</span></code></a></li>
  509. <li class="toctree-l4"><a class="reference internal" href="#images-html"><code class="docutils literal notranslate"><span class="pre">images.html</span></code></a><ul>
  510. <li class="toctree-l5"><a class="reference internal" href="#image-labels">Image labels</a></li>
  511. </ul>
  512. </li>
  513. <li class="toctree-l4"><a class="reference internal" href="#videos-html"><code class="docutils literal notranslate"><span class="pre">videos.html</span></code></a></li>
  514. <li class="toctree-l4"><a class="reference internal" href="#torrent-html"><code class="docutils literal notranslate"><span class="pre">torrent.html</span></code></a></li>
  515. <li class="toctree-l4"><a class="reference internal" href="#map-html"><code class="docutils literal notranslate"><span class="pre">map.html</span></code></a></li>
  516. <li class="toctree-l4"><a class="reference internal" href="#paper-html"><code class="docutils literal notranslate"><span class="pre">paper.html</span></code></a></li>
  517. <li class="toctree-l4"><a class="reference internal" href="#packages"><code class="docutils literal notranslate"><span class="pre">packages</span></code></a></li>
  518. <li class="toctree-l4"><a class="reference internal" href="#code-html"><code class="docutils literal notranslate"><span class="pre">code.html</span></code></a></li>
  519. <li class="toctree-l4"><a class="reference internal" href="#files-html"><code class="docutils literal notranslate"><span class="pre">files.html</span></code></a></li>
  520. <li class="toctree-l4"><a class="reference internal" href="#products-html"><code class="docutils literal notranslate"><span class="pre">products.html</span></code></a></li>
  521. </ul>
  522. </li>
  523. <li class="toctree-l3"><a class="reference internal" href="#answer-results">Answer results</a></li>
  524. <li class="toctree-l3"><a class="reference internal" href="#suggestion-results">Suggestion results</a></li>
  525. <li class="toctree-l3"><a class="reference internal" href="#correction-results">Correction results</a></li>
  526. <li class="toctree-l3"><a class="reference internal" href="#infobox-results">Infobox results</a></li>
  527. </ul>
  528. </li>
  529. <li class="toctree-l2"><a class="reference internal" href="search_api.html">Search API</a></li>
  530. <li class="toctree-l2"><a class="reference internal" href="plugins/index.html">Plugins</a></li>
  531. <li class="toctree-l2"><a class="reference internal" href="answerers/index.html">Answerers</a></li>
  532. <li class="toctree-l2"><a class="reference internal" href="translation.html">Translation</a></li>
  533. <li class="toctree-l2"><a class="reference internal" href="lxcdev.html">Developing in Linux Containers</a></li>
  534. <li class="toctree-l2"><a class="reference internal" href="makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
  535. <li class="toctree-l2"><a class="reference internal" href="reST.html">reST primer</a></li>
  536. <li class="toctree-l2"><a class="reference internal" href="searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
  537. </ul>
  538. </li>
  539. <li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li>
  540. <li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li>
  541. </ul>
  542. <h3>Project Links</h3>
  543. <ul>
  544. <li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
  545. <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
  546. <li><a href="https://searx.space">Public instances</a>
  547. <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
  548. </ul><h3>Navigation</h3>
  549. <ul>
  550. <li><a href="../index.html">Overview</a>
  551. <ul>
  552. <li><a href="index.html">Developer documentation</a>
  553. <ul>
  554. <li>Previous: <a href="result_types/infobox.html" title="previous chapter">Infobox Results</a>
  555. <li>Next: <a href="search_api.html" title="next chapter">Search API</a></ul>
  556. </li>
  557. </ul>
  558. </li>
  559. </ul>
  560. <search id="searchbox" style="display: none" role="search">
  561. <h3 id="searchlabel">Quick search</h3>
  562. <div class="searchformwrapper">
  563. <form class="search" action="../search.html" method="get">
  564. <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
  565. <input type="submit" value="Go" />
  566. </form>
  567. </div>
  568. </search>
  569. <script>document.getElementById('searchbox').style.display = "block"</script>
  570. <div role="note" aria-label="source link">
  571. <h3>This Page</h3>
  572. <ul class="this-page-menu">
  573. <li><a href="../_sources/dev/templates.rst.txt"
  574. rel="nofollow">Show Source</a></li>
  575. </ul>
  576. </div>
  577. </div>
  578. </div>
  579. <div class="clearer"></div>
  580. </div>
  581. <div class="footer" role="contentinfo">
  582. &#169; Copyright SearXNG team.
  583. </div>
  584. </body>
  585. </html>