Skip to content

Commit ba8cd38

Browse files
committed
modify google search
1 parent 9b364a0 commit ba8cd38

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

_config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ exclude: [".rvmrc", ".rbenv-version", "README.md", "Rakefile", "changelog.md", "
44
markdown: kramdown
55
highlights: pygments
66
url:
7+
cdn_url: 7u2t01.com1.z0.glb.clouddn.com
78
lsi: false
89
safe: true
910
timezone: Asia/Shanghai

_includes/search.html

+15-13
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,25 @@
22
<div class="categories-list-header">
33
站内搜索
44
</div>
5-
<form action="https://google3.azurewebsites.net/search" method="get">
6-
<div class="input-group">
7-
<input type="text" name="q" class="form-control">
8-
<input type="hidden" name="ie" value="UTF-8" />
9-
<input type="hidden" name="sitesearch" value="{{ site.domain }}" />
10-
<span class="input-group-btn">
11-
<button class="btn btn-default" type="submit">
12-
<span class="glyphicon glyphicon-search">
13-
</span>
14-
</button>
15-
</span>
16-
</div>
17-
</form>
5+
<script>
6+
(function() {
7+
var cx = '015104026998727815951:bza74imjgds';
8+
var gcse = document.createElement('script');
9+
gcse.type = 'text/javascript';
10+
gcse.async = true;
11+
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
12+
'//cse.google.com/cse.js?cx=' + cx;
13+
var s = document.getElementsByTagName('script')[0];
14+
s.parentNode.insertBefore(gcse, s);
15+
})();
16+
</script>
17+
<gcse:search></gcse:search>
18+
1819
</div>
1920

2021

2122

2223

2324

2425

26+

0 commit comments

Comments
 (0)