今天,鼓捣一下,把页面的头像和标签页都加上了。

页面头像

头像主要是在next主题中的_config.yml(不是最外层的yml中)将以下的链接添加为自己的头像:

1
2
3
4
5
6
7
8
# Sidebar Avatar
avatar:
# Replace the default image and set the url here.
url: /images/avatar.png #/images/avatar.gif
# If true, the avatar will be displayed in circle.
rounded: true
# If true, the avatar will be rotated with the cursor.
rotated: true

页面头像可以用插件:頭像 照片 Avatar Maker - Chrome 网上应用店 (google.com)生成,比较随性。

标签页生成

这里有一点小坑,我一直发现tags点不开,原来发现是这里没有添加tags页面(page),首先要使用命令,添加响应的页面:

1
2
3
$ cd hexo文件目录
$ hexo new page "tags"
$ hexo new page "categories"

然后再在yaml(同页面头像那里)进行相关的设置,相当于打开这个功能:

1
2
3
4
5
6
7
8
9
menu:
home: / || fa fa-home
#about: /about/ || fa fa-user
tags: /tags/ || fa fa-tags
categories: /categories/ || fa fa-th
archives: /archives/ || fa fa-archive
#schedule: /schedule/ || fa fa-calendar
#sitemap: /sitemap.xml || fa fa-sitemap
#commonweal: /404/ || fa fa-heartbeat

最后,在新生成的tags和categories页面中,添加一行:

1
2
3
4
5
---
title: tags
date: 2018-01-23 17:14:51
type: "tags" #新添加的
---
1
2
3
4
5
---
title: categories
date: 2018-01-23 17:14:51
type: "categories" #新添加的
---

最后终于大功告成。

参考资料