-
1、需要工具
工具 下载 nodejs https://nodejs.org/en/download/ hexo npm install hexo-cli -g deploy npm install hexo-deployer-git --save server npm i hexo-server -
2、常用命令
操作 命令 命令缩写 本地启动 hexo clean - hexo generate hexo g hexo server hexo s 部署github hexo clean - hexo generate hexo g hexo deploy hexo d -
3、部署地址配置,在
_config.yml
文件内修改如下属性。deploy: type: git repo: https://github.com/YourgithubName/YourgithubName.github.io.git branch: master
-
4、在
hexo
官网下载自己喜欢的主题,放置到themes
目录下,然后在_config.yml
文件内修改theme
属性为你的主题文件名,重启服务可以查看效果。 -
5、设置RSS
-
安装rss相关插件:
npm i hexo-generator-feed
-
在
_config.yml
配置文件下找到Extensions
添加如下内容:plugin: - hexo-generator-feed #Feed Atom feed: type: atom path: atom.xml limit: 20
-
进入到你的主题的配置文件下,找到你的放
rss
的位置,添加/atom.xml
即可。
-
-
常见问题汇总
- hexo发生error:spawn failed错误的解决方法
1. 删除.deploy_git文件夹; 2. 输入git config --global core.autocrlf false
- hexo发生error:spawn failed错误的解决方法
Hexo博客搭建工具下载与安装
最新推荐文章于 2020-12-16 19:48:38 发布