Permalink
Browse files

Brink back the search feature

The search layout has been removed in 755f2e3 by mistake. We can't
simply bring back it since the Google web search API is deprecated.
Therefore, the search feature now uses a Google custom search engine.

Fixes #264.
  • Loading branch information...
robin850 committed Mar 3, 2014
1 parent 478fa3c commit 8069e47c435e021c137c6d23b3bf40183d8906ea
Showing with 20 additions and 0 deletions.
  1. +20 −0 _layouts/search.html
View
@@ -0,0 +1,20 @@
+---
+layout: base
+---
+
+{{ content }}
+
+<script>
+ (function() {
+ var cx = '011663737245720498799:pbicw6zy8ya';
+ var gcse = document.createElement('script');
+ gcse.type = 'text/javascript';
+ gcse.async = true;
+ gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
+ '//www.google.com/cse/cse.js?cx=' + cx;
+ var s = document.getElementsByTagName('script')[0];
+ s.parentNode.insertBefore(gcse, s);
+ })();
+</script>
+
+<gcse:searchresults-only></gcse:searchresults-only>

0 comments on commit 8069e47

Please sign in to comment.