Hexo測試 & 部屬
Hexo 部屬記錄
✅ 懶人包
1 | npm install hexo-deployer-git --save |
使用 hexo-deployer-git 時:不需要再手動 git add / commit / push
前置作業
Docs: https://hexo.io/docs/one-command-deployment
假設 repo 已建立完成:
1️⃣ 設定 _config.yml
1 | deploy: |
2️⃣ 安裝 deploy 套件(只需一次)
1 | npm install hexo-deployer-git --save |
正確部屬流程(已安裝 hexo-deployer-git)
1 | hexo clean |
Hexo 會自動:
- 產生 public
- 建立 / 更新
.deploy_git - 自動 commit
- 自動 push
⚠️ 不要再手動 git 操作 Pages repo
GitHub Pages 會先 build,因此會看到:
Checks → Pending
等待一段時間後會變成:
✔ Success
確認 deploy
查看:Repo → Actions 或 Repo → Settings → Pages
是否顯示 Deployment successful
若未使用 hexo-deployer-git(純手動)
1 | hexo clean |
會產生 public 目錄。
將 public 內容複製到 Pages repo 後:
1 | git status |
舊流程(錯誤但偶爾可行)
1 | npm install hexo-deployer-git --save |
1️⃣ 同時操作兩個 repo:
hexo deploy→.deploy_git- 手動 git → 外層 repo
2️⃣ hexo deploy 預設會 force push 改寫遠端歷史
手動 git pull 容易產生衝突
Hexo 測試
這裡是用來測試 Hexo 的程式碼出來的效果用的。
本站大部分內容均參考至:
在撰寫時會需要測試markdown的輸出結果,可以去
基本上一般的 Html 也可以用,但跟 Markdown 混用可能會發生問題。
本篇也不算正式的教學,參考就好,東西太多我會分篇。
Butterfly
內容參考Butterfly
display
content
content
pie
title Key elements in Product X
"Calcium" : 42.96
"Potassium" : 50.05
"Magnesium" : 10.01
"Iron" : 5
info 提示塊標籤
success 提示塊標籤
如需要用圖示,可以去Icon
This is Tab 1.
This is Tab 2.
This is Tab 3.
只有圖標 沒有Tab名字
測試 hexo 張貼 youtube 影片連結(需有影片ID -> 分享 -> 網址後面一串英文):
Hexo docs.
Block
這裡是從 Hexo 擷取 ,更多資源可以去該網看看。
content
Do not just seek happiness for yourself. Seek happiness for all. Through kindness. Through mercy.
NEW: DevDocs now comes with syntax highlighting. http://devdocs.io
Every interaction is both precious and an opportunity to delight.
1 | array.map(callback[, thisArg]) |
Others
HTML & CSS
Reference: 參考網址
css 背景測試:
Reference: 參考網址
格式是這樣:
1 | <font color= "(顏色hex編碼, e.x. #008000)" > Color you want </font> |
顏色編碼可以去這裡找
輸出類似 Color you want
表格:
| Column 1 | Column 2 | Column 3 |
|---|---|---|
| Text1 | Text2 | Text3 |
| Text4 | Text5 | Text6 |

This is the author card.
Welcome to D.S., wish you a nice day .







