Node环境下Hexo的搭建
发布时间 :
字数:235
阅读 :
Enviroment
Node.js and github account
init your hexo
1 2 3 4 5
| $ npm install hexo-cli -g $ hexo version $ hexo init {yourname}.github.io $ cd {yourname}.github.io $ npm install
|
file tree
1 2 3 4 5 6 7 8 9 10 11 12
| $ tree ...... file tree ├── .deploy ├── node_modules ├── public ├── scaffolds ├── source | ├── _drafts | └── _posts ├── themes ├── _config.yml └── package.json
|
Run server
1 2 3 4 5 6 7 8 9
| $ npm install hexo-server --save or $ yarn add hexo-server && yarn install
$ hexo server or $ hexo s ······ http://localhost:4000/
|
configurate your github
1 2 3 4 5 6
| $ git config --global user.name "your-name" $ git config --global user.email "your-email"
$ npm install hexo-deployer-git --save or $ yarn add hexo-deployer-git && yarn install
|
edit your config file
path:{yourname}.github.io/_config.yml
1 2 3 4 5 6 7
|
deploy: type: git repo: git@github.com:{yourname}/{yourname}.github.io.git branch: master
|
Deploy to remote sites
1 2 3 4 5 6
| $ hexo clean $ hexo generate $ hexo deploy or $ hexo clean $ hexo d -g
|
new article
转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。可以在下面评论区评论,也可以邮件至 nathanwriting@126.com
文章标题:Node环境下Hexo的搭建
字数:235
本文作者:Nathaniel
发布时间:2020-10-19, 15:28:59
最后更新:2023-11-06, 22:59:18
原始链接:http://example.com/2020/10/19/hexo-for-node/
版权声明: "署名-非商用-相同方式共享 4.0" 转载请保留原文链接及作者。