文章目录
  1. 1. 添加百度搜索

添加百度搜索


Hexo默认使用的是google搜索,因为google的访问在国内是需要翻墙的,所以将默认的搜索引擎改成百度的。

只需要在#THEME/layout/_partial/header.ejs文件中,找到之前的google搜索,将内容改为:

1
2
3
4
5
6
7
8
9
10
<div class="search">
<form action="//baidu.com/baidu" method="get" accept-charset="utf-8">
<input type="search" name="word" results="0" placeholder="<%= __('search') %>">
<input type="hidden" name="si" value="<%- config.url.replace(/^https?:\/\//, '') %>">
<input name=tn type=hidden value="bds">
<input name=cl type=hidden value="3">
<input name=ct type=hidden value="2097152">
<input name=s type=hidden value="on">
</form>
</div>
文章目录
  1. 1. 添加百度搜索