summaryrefslogtreecommitdiff
path: root/_includes/gw_tools/search_module.html
diff options
context:
space:
mode:
Diffstat (limited to '_includes/gw_tools/search_module.html')
-rw-r--r--_includes/gw_tools/search_module.html28
1 files changed, 3 insertions, 25 deletions
diff --git a/_includes/gw_tools/search_module.html b/_includes/gw_tools/search_module.html
index f79335a..7664e19 100644
--- a/_includes/gw_tools/search_module.html
+++ b/_includes/gw_tools/search_module.html
@@ -1,25 +1,3 @@
-{% if site.google_cse_token %}
-<script>
- (function () {
- var cx = "{{site.google_cse_token}}";
- var gcse = document.createElement('script');
- gcse.type = 'text/javascript';
- gcse.async = true;
- gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
- var s = document.getElementsByTagName('script')[0];
- s.parentNode.insertBefore(gcse, s);
- })();
-</script>
-<gcse:search></gcse:search>
-{% else %}
-<form method="GET" action="{{ site.github.repository_url }}/search">
- <input type="text" name="q[]" placeholder="Text to search">
- {% if site.use_github_wiki %}
- <input type="hidden" name="type" value="Wikis">
- {% else %}
- <!-- <input type="hidden" name="l" value="Markdown"> -->
- <input type="hidden" name="q[]" value="path:/{{ site.wiki_folder }}">
- {% endif %}
- <input type="submit" value="Search">
-</form>
-{% endif %} \ No newline at end of file
+{% assign se = site.search_engine | default: "github" %}
+{% assign file = "gw_tools/search_" | append: se | append: ".html" %}
+{% include {{file}} %} \ No newline at end of file