J哥录制+处理3晚,耗时15h
视频地址:程序猿应该有个高逼格的blog
请先看视频,参考以下笔记,有问题及时留言或者私信
请先看视频,参考以下笔记,有问题及时留言或者私信
请先看视频,参考以下笔记,有问题及时留言或者私信
先来看下J哥最终部署的结果
Node.js部署
首先先确认是否安装了Node.js
在cmd窗口输入以下两个命令,出现标识,成功安装node.js
node -v
npm -v
若未安装,则先安装Node.js
永久设置淘宝源:
npm config set registry http://registry.npm.taobao.org/
git部署
hexo部署
官方文档【https://hexo.io/zh-cn/docs/】
npm install -g hexo-cli
先创建 E:\hexo
初始化博客目录
hexo init ruozedatablog
npm install
清理缓存
hexo clean
生成静态文件
hexo g
启动服务器
hexo s
可以整理常用命令组合
hexo clean && hexo g && hexo s
github
注册 英文名称简约 好记 高大尚
https://github.com/join?source=header-home
https://github.com/Hackeruncle ssh-keygen -t rsa -b 4096 -C "Hackeruncle@163.com" /c/Users/Administrator/.ssh/id_rsa.pub ssh -T git@github.com 第一次执行 是需要输入yes 配置本地git的信息 git config --global user.name "Hackeruncle" git config --global user.email "Hackeruncle@163.com" 创建仓库Hackeruncle.github.io,Hackeruncle https://github.com/Hackeruncle/Hackeruncle.github.io
hexo部署github
window—>github
npm install hexo-deployer-git --save # Deployment ## Docs: https://hexo.io/docs/deployment.html deploy: type: git repo: git@github.com:Hackeruncle/Hackeruncle.github.io.git branch: master hexo clean && hexo deploy 应该会出现 github的登录窗口 输入账号密码登录
换个高大尚的主题
https://github.com/JoeyBling/hexo-theme-yilia-plus
cd ./themes/ git clone --depth=1 https://github.com/JoeyBling/hexo-theme-yilia-plus.git ./yilia-plus 修改hexo根目录下的 _config.yml theme: yilia-plus 部署推 hexo clean && hexo deploy
最终选择Hackeruncle-hexo(★)
选择Hackeruncle-hexo
https://github.com/Hackeruncle/Hackeruncle-hexo
clone仓库
Administrator@G0XO2VBVTUOBVSS MINGW64 /e/blog $ git clone https://github.com/hackeruncle/hackeruncle-hexo.git ./hackeruncle-hexo Administrator@G0XO2VBVTUOBVSS MINGW64 /e/blog $ cd hackeruncle-hexo/
github重建仓库
https://github.com/Hackeruncle/Hackeruncle.github.io 先delete repo:Hackeruncle.github.io 再创建 repo:Hackeruncle.github.io
_config.yml修改仓库地址
deploy: type: git repo: git@github.com:Hackeruncle/Hackeruncle.github.io.git branch: master
本地测试+推送github
Push hexo blog html to local : hexo clean && hexo generate && hexo server open web: http://localhost:4000 Push hexo blog html to github : hexo clean && hexo deploy open web: https://Hackeruncle.github.io
创建blog
Markdown语法学习
http://markdown.xiaoshujiang.com/