11.26 程序猿應該有個高逼格的blog

J哥錄製+處理3晚,耗時15h

視頻地址:

請先看視頻,參考以下筆記,有問題及時留言或者私信

請先看視頻,參考以下筆記,有問題及時留言或者私信

請先看視頻,參考以下筆記,有問題及時留言或者私信

先來看下J哥最終部署的結果

程序猿應該有個高逼格的blog

Node.js部署

首先先確認是否安裝了Node.js

在cmd窗口輸入以下兩個命令,出現標識,成功安裝node.js

node -v


npm -v

若未安裝,則先安裝Node.js

程序猿應該有個高逼格的blog

永久設置淘寶源:

npm config set registry http://registry.npm.taobao.org/

git部署

程序猿應該有個高逼格的blog

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 "[email protected]"

/c/Users/Administrator/.ssh/id_rsa.pub

ssh -T [email protected] 第一次執行 是需要輸入yes

配置本地git的信息
git config --global user.name "Hackeruncle"
git config --global user.email "[email protected]"

創建倉庫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: [email protected]: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: [email protected]: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/


分享到:


相關文章: