去逛网下载 node-v6.11.2-x64.msi,或者去csdn 下载,csdn 下载速度快一点
反正下载好msi文件后,双击打开安装,也是一路next,不过在Custom Setup这一步记得选 Add to PATH,这样你就不用自己去配置电脑上环境变量了,装完在按 win + r 快捷键调出运行,然后输入cmd确定,在cmd中输入path可以看到你的 nod e 是否配置在里面(环境变量),没有的话你就自由发挥吧
测试查看: node -v
v6.11.2
npm -v(安装nod e 后就存在npm了)
3.10.10
npm update -g (版本比较低,更新一下,并下载库)
npm -v
6.1.0
安装 git
下载git安装文件,双击执行安装
git config --global user.name "你的GitHub用户名"
git config --global user.email "你的GitHub注册邮箱"
ssh-keygen -t rsa -C "你的GitHub注册邮箱"
将公钥添加到github:
用户头像→Settings→SSH and GPG keys→New SSH key→将id_rsa.pub中的内容复制到Key文本框中,然后点击Add SSH key(添加SSH)按钮
ssh-add /c/Users/baoy/.ssh/id_rsa
测试是否联通
ssh -T [email protected]
联通报文
The authenticity of host 'github.com (53.72.123.109)' can't be established.
RSA key fingerprint is SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,53.72.123.109' (RSA) to the list of known hosts.
Hi xxxx! You've successfully authenticated, but GitHub does not provide shell access.
# 安装插件
npm install hexo-deployer-git --save
# 修改配置
(注意冒号后面有一空格)
deploy:
type: git
repository: [email protected]:curoiusby/curoiusby.github.io.git
branch: master
hexo clean
hexo generate
hexo deploy
(hexo d -g)
# 发布成功后报文
INFO Start processing
INFO Files loaded in 2.02 s
INFO Generated: index.html
INFO Generated: img/BTCQR.png
INFO Generated: img/WeChatQR.png
INFO Generated: img/AliPayQR.png
INFO Generated: img/github.svg
INFO Generated: img/wechat.svg
INFO Generated: img/paypal.svg
INFO Generated: img/alipay.svg
INFO Generated: img/bitcoin.svg
INFO Generated: img/like.svg
INFO Generated: archives/2018/index.html
INFO Generated: archives/index.html
INFO Generated: donate/index.html
INFO Generated: archives/2018/07/index.html
INFO Generated: js/codeblock-resizer.js
INFO Generated: js/donate.js
INFO Generated: js/search.js
INFO Generated: js/fancybox.js
INFO Generated: js/share.js
INFO Generated: js/smartresize.js
INFO Generated: js/totop.js
INFO Generated: css/donate.css
INFO Generated: css/style.css
INFO Generated: css/default.css
INFO Generated: 2018/07/16/第一篇-linux-hexo-安装详细/index.html
INFO Generated: js/gitment.browser.js
INFO 26 files generated in 277 ms
hexo d
INFO Deploying: git
INFO Clearing .deploy_git folder...
INFO Copying files from public folder...
INFO Copying files from extend dirs...
warning: LF will be replaced by CRLF in css/default.css.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in css/donate.css.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in css/style.css.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in donate/index.html.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in js/codeblock-resizer.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in js/donate.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in js/fancybox.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in js/gitment.browser.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in js/search.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in js/share.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in js/smartresize.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in js/totop.js.
The file will have its original line endings in your working directory.
[master 1884519] Site updated: 2018-07-17 10:43:43
5 files changed, 5 insertions(+), 5 deletions(-)
rewrite "2018/07/16/\347\254\254\344\270\200\347\257\207-linux-hexo-\345\256\211\350\243\205\350\257\246\347\273\206/index.html" (66%)
rewrite archives/2018/07/index.html (68%)
rewrite archives/2018/index.html (68%)
rewrite archives/index.html (68%)
rewrite index.html (87%)
# 查看页面
https://curoiusby.github.io/