0%

博客搭建过程

前言

本博客搭建过程中都是从网上找的一些内容经过实践,一步一步走过来,因为本人对node.js不是很熟悉,所以只能是靠baidu、google,最终这个博客搭建得还算顺利,这个主题看着也还算顺眼,开源的世界就是好。

安装NodeJs

安装hexo

Hexo 配置

换个主题

http://notes.iissnan.com/
$ cd your-hexo-site
$ git clone https://github.com/iissnan/hexo-theme-next themes/next

http://theme-next.iissnan.com/

安装git

发布博客

$ npm install hexo-deployer-git –save

备份

$ npm install hexo-git-backup –save

一些小技巧

将源文件按年进行归集

在 _config.yml 找到以下配置

1
2
3
4
5
6
# 可以将生成的post按年的目录存储
new_post_name: :year/:title.md # File name of new posts

# 如果写得很多也可以按月、按日进行分目录存储
new_post_name: :year/:/month/:/day/:title.md # File name of new posts

再执行hexo new post 就发现新的post 是按照指定的目录存储的。

https://github.com/coneycode/hexo-git-backup
https://www.zhihu.com/question/21193762