Permalink
Browse files

modify google search

  • Loading branch information...
1 parent 9b364a0 commit ba8cd38b5e5e70a37b9a15deacc6c1b22558558b @EZLippi committed Sep 4, 2015
Showing with 16 additions and 13 deletions.
  1. +1 −0 _config.yml
  2. +15 −13 _includes/search.html
View
@@ -4,6 +4,7 @@ exclude: [".rvmrc", ".rbenv-version", "README.md", "Rakefile", "changelog.md", "
markdown: kramdown
highlights: pygments
url:
+cdn_url: 7u2t01.com1.z0.glb.clouddn.com
lsi: false
safe: true
timezone: Asia/Shanghai
View
@@ -2,23 +2,25 @@
<div class="categories-list-header">
站内搜索
</div>
- <form action="https://google3.azurewebsites.net/search" method="get">
- <div class="input-group">
- <input type="text" name="q" class="form-control">
- <input type="hidden" name="ie" value="UTF-8" />
- <input type="hidden" name="sitesearch" value="{{ site.domain }}" />
- <span class="input-group-btn">
- <button class="btn btn-default" type="submit">
- <span class="glyphicon glyphicon-search">
- </span>
- </button>
- </span>
- </div>
- </form>
+ <script>
+ (function() {
+ var cx = '015104026998727815951:bza74imjgds';
+ var gcse = document.createElement('script');
+ gcse.type = 'text/javascript';
+ gcse.async = true;
+ gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
+ '//cse.google.com/cse.js?cx=' + cx;
+ var s = document.getElementsByTagName('script')[0];
+ s.parentNode.insertBefore(gcse, s);
+ })();
+</script>
+<gcse:search></gcse:search>
+
</div>
+

0 comments on commit ba8cd38

Please sign in to comment.