瀏覽代碼

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>