Преглед на файлове

add embedded search to docs

Noémi Ványi преди 8 години
родител
ревизия
09a46dacec
променени са 1 файла, в които са добавени 16 реда и са изтрити 0 реда
  1. 16
    0
      docs/admin/api.rst

+ 16
- 0
docs/admin/api.rst Целия файл

@@ -76,3 +76,19 @@ Sample response
76 76
       ], 
77 77
       "safe_search": 0
78 78
     }
79
+
80
+Embed search bar
81
+----------------
82
+
83
+The search bar can be embedded into websites. Just paste the example into the HTML of the site.
84
+URL of the searx instance and values are customizable.
85
+
86
+.. code:: html
87
+    
88
+    <form method="post" action="https://searx.me/">
89
+        <!-- search query --> <input type="text" name="q" />
90
+        <!-- categories   --> <input type="hidden" name="categories" value="general,social media" />
91
+        <!-- language     --> <input type="hidden" name="lang" value="all" />
92
+        <!-- locale       --> <input type="hidden" name="locale" value="en" />
93
+        <!-- date filter  --> <input type="hidden" name="time_range" value="month" />
94
+    </form>