博客历史小记

因为换电脑的原因,自己把博客的源代码给丢失了,因此好久没有再写文章,今天终于把博客重新部署使用起来了(幸亏文章比较少)。以后会慢慢的在上面会继续写一些文章。本文特记录一下自己博客的一些配置,以防自己再次出现这种情况时重新配置。

Hexo配置

站点配置

1
2
3
4
5
6
7
8
# Site
title: Dr's Note
subtitle: I am always on the way
description: 我活在世上,无非想要明白些道理,遇见些有趣的事。倘能如我所愿,我的一生就算成功。
keywords: 网络安全,备忘录
author: Dr
language: zh-CN
timezone: Asia/Shanghai

发布配置

1
2
3
4
deploy:
type: git
repo: git@github.com:0x4472/0x4472.github.io
branch: master

注意repo的格式需要写成git:git@github.com:user/repo的形式,利用https协议在发布时会仍然让输入密码

主题

将需要配置的主题下载至themes文件夹,然后在配置文件中配置themes: themeName

主题配置

配置菜单

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

配置完菜单之后,还需要使用hexo new page 'pageName'命令生成对应的菜单页面

配置社交网站

1
2
3
4
5
6
7
8
9
10
11
social:
GitHub: https://github.com/0x4472 || github
E-Mail: mailto:ox4472@qq.com || envelope
#Google: https://plus.google.com/yourname || google
#Twitter: https://twitter.com/yourname || twitter
#FB Page: https://www.facebook.com/yourname || facebook
#VK Group: https://vk.com/yourname || vk
#StackOverflow: https://stackoverflow.com/yourname || stack-overflow
#YouTube: https://youtube.com/yourname || youtube
#Instagram: https://instagram.com/yourname || instagram
#Skype: skype:yourname?call|chat || skype

内建标签

在主题当中有一些内建标签能够快速生成特定内容。
具体可参考next的内建标签配置