**摘要:**使用Next主题搭建了博客,虽然说头像什么的都是浮云,但是没有还是略显不爽,但恕我愚昧只按照Next官方文档没弄出来,官方写的太简略了,记录一下较为详细的步骤。
更新:打赏
更新:站内搜索
设置头像
这个头像就是站内侧边栏上那个头像
- 第一步找个jpg图片
- 将图片放到站点配置目录images目录下(并没有规定非放在这)
1
2
|
#我图片放的路径
themes/next/source/images/suolong.jpg
|
1
2
3
|
#vim themes/next/_config.yml
#在任意位置添加如下内容
avatar: images/suolong.jpg
|
设置网站logo
也就是浏览器标签上的显示图标,这个图片是有要求的,可以使用在线工具生成。
1
|
themes/next/source/images/favicon.ico
|
1
2
|
#vim themes/next/_config.yml
favicon: images/favicon.ico
|
打赏功能
如果url的话很简单,直接参照官网就可以,对于不使用外链,图片放本地的话需要注意下路径
1
2
|
themes/next/source/images/uploads/zhipay.jpg
themes/next/source/images/uploads/weipay.jpg
|
1
2
3
4
5
6
|
#vim themes/next/_config.yml
#使用外链的话很简单,如下,直接写外链地址就可以了
#wechatpay: http://i2.piimg.com/517630/8ef419c517319dd1.jpg
#alipay: http://i2.piimg.com/517630/cac5f15767848576.jpg
alipay: /images/uploads/zhipay.jpg
wechatpay: /images/uploads/weipay.jpg
|
站内搜索
1
|
npm install hexo-generator-search --save
|
1
2
3
|
search:
path: sitemap.xml
field: post
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#vim themes/next/layout/_partials/search/localsearch.swig
#修改如下:
<div class="popup">
<span class="search-icon fa fa-search"></span>
<input type="text" id="local-search-input" placeholder="search my blog...">
<div id="local-search-result"></div>
<span class="popup-btn-close">close</span>
</div>
#原文件如下:
<script type="text/javascript">
var search_path = "<%= config.search.path %>";
if (search_path.length == 0) {
search_path = "search.xml";
}
var path = "<%= config.root %>" + search_path;
searchFunc(path, 'local-search-input', 'local-search-result');
</script>
|
以上