为了方便更换电脑快速配置hexo所写的文档
安装hexo
1 2 3 4
| npm install -g hexo-cli hexo init hexo //在D盘会生成hexo的文件夹 npm install hexo-deployer-git --save //安装deploy上传到github git clone https://github.com/next-theme/hexo-theme-next themes/next //next主题安装
|
扩展功能
豆瓣读书
插件地址
1
| npm install hexo-douban --save-dev
|
hexo的_config.yml配置如下信息
1 2 3 4 5 6 7 8 9 10 11 12 13
| douban: id: 162282689 # 你的豆瓣ID builtin: true book: title: '那些年,我翻阅过的书' quote: '思想和身体,总有一个在路上' #movie: #title: '那些年,我追过的电影' #quote: '过去、现在、和未来' #game: #title: '那些年,我玩过的游戏' #quote: '还记得你曾经的游戏角色吗' timeout: 10000
|
进入next主题的language,在zn-CN.yml中添加books:书籍
搜索功能
1
| npm install hexo-generator-searchdb --save
|
hexo的_config.yml配置如下信息
1 2 3 4 5 6
| search: path: search.json field: post format: html limit: 10000 content: true
|
最后hexo主题配置文件(\themes\next_config.yml),修改local_search的enable为true
1
| npm install --save hexo-generator-feed
|
hexo的_config.yml配置如下信息
1 2 3 4 5 6 7
| # rss Plugins: - hexo-generate-feed feed: type: atom path: atom.xml limit: 20
|