nodejs部署
安裝nodejs
必須部署nodejs8.6以上版本
C:\Users\Administrator>node -v
v8.11.1
C:\Users\Administrator>npm -v
5.6.0
永久設置淘寶源:
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 bigdatablog
進入bigdata目錄
npm install
清理緩存
hexo clean
生成靜態文件
hexo g
啓動服務器
hexo s
可以整理常用命令組合
hexo clean && hexo g && hexo s
hexo上傳github
npm install hexo-deployer-git --save
進入bigdata目錄下_config.yml文件,加上github地址
# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
type: git
repo: [email protected]:Stefanboy/Stefanboy.github.io.git
branch: master
上傳
hexo clean && hexo deploy 應該會出現 github的登錄窗口 輸入賬號密碼登錄
地址:https://Steanboy.github.io/
換主題
https://github.com/JoeyBling/hexo-theme-yilia-plus
進入bigdatablog的themes目錄
cd ./themes/
git clone --depth=1 https://github.com/JoeyBling/hexo-theme-yilia-plus.git ./yilia-plus
修改hexo根目錄下的 _config.yml
theme: yilia-plus
部署上傳到github
hexo clean && hexo deploy
選擇hackeruncle-hexo的主題
-
選擇hackeruncle-hexo
-
clone倉庫
進入blog目錄 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/Stefanboy/Stefanboy.github.io 先delete repo:Stefanboy.github.io 再創建 repo:Stefanboy.github.io
-
_config.yml修改倉庫地址
deploy: type: git repo: [email protected]:Stefanboy/Stefanboy.github.io.git branch: master
-
本地測試+推送github
先在本地試一下 hexo clean && hexo generate && hexo server 打開頁面 http://localhost:4000 本地沒有問題,推送部署到github hexo clean && hexo deploy 打開頁面 https://Stefanboy.github.io
如何創建blog
Markdown語法學習
[http://markdown.xiaoshujiang.com/](http://markdown.xiaoshujiang.com/)