summaryrefslogtreecommitdiff
path: root/_includes
diff options
context:
space:
mode:
Diffstat (limited to '_includes')
-rw-r--r--_includes/gw_head/meta.html3
-rw-r--r--_includes/gw_tools/search_github.html10
-rw-r--r--_includes/gw_tools/search_google.html12
-rw-r--r--_includes/gw_tools/search_js.html15
-rw-r--r--_includes/gw_tools/search_module.html28
5 files changed, 42 insertions, 26 deletions
diff --git a/_includes/gw_head/meta.html b/_includes/gw_head/meta.html
index 141ab05..bfae3da 100644
--- a/_includes/gw_head/meta.html
+++ b/_includes/gw_head/meta.html
@@ -5,7 +5,8 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="width=device-width">
-<title>{{ site.title | default: site.github.repository_name }} by {{ site.github.owner_name }}</title>
+
+{% seo %}
{% if site.inc_after_meta %}
{% include {{ site.inc_after_meta }} %}
diff --git a/_includes/gw_tools/search_github.html b/_includes/gw_tools/search_github.html
new file mode 100644
index 0000000..efcc5e8
--- /dev/null
+++ b/_includes/gw_tools/search_github.html
@@ -0,0 +1,10 @@
+<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> \ No newline at end of file
diff --git a/_includes/gw_tools/search_google.html b/_includes/gw_tools/search_google.html
new file mode 100644
index 0000000..0c3e675
--- /dev/null
+++ b/_includes/gw_tools/search_google.html
@@ -0,0 +1,12 @@
+<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> \ No newline at end of file
diff --git a/_includes/gw_tools/search_js.html b/_includes/gw_tools/search_js.html
new file mode 100644
index 0000000..673fb39
--- /dev/null
+++ b/_includes/gw_tools/search_js.html
@@ -0,0 +1,15 @@
+<div class="container">
+ <div class="well" id="searchbox">
+ <input id="search-field" placeholder="Search the Site"/>
+ <ul id="results"></ul>
+ </div>
+</div>
+
+<script src="{{ '/assets/js/jquery.camelhunter.min.js' | relative_url }}"></script>
+<script type="text/javascript">
+ $("#search-field").camelHunter({
+ onKeyUp : true,
+ rss: "/sitemap_full.xml",
+ results : "#results"
+ });
+</script> \ No newline at end of file
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