建立HEXO部落格

查資料的時候都會看到一些風格很對我胃口的部落格
研究了一下發現是 HEXO + NexT 的組合
文章是用 markdown 來編寫, 寫起來應該是很舒服的 XD
也有 plugins 可以安裝來玩

這篇就先來簡單紀錄一下如何在自己電腦上安裝 HEXO + NexT

HEXO

以下是官網的範例, 我是用 yarn 來代替 npm install

1
2
3
4
5
npm install hexo-cli -g
hexo init blog
cd blog
npm install
hexo server

接著就可以在 http://localhost:4000 來看到第一篇 Hello World

NexT

1
git clone https://github.com/theme-next/hexo-theme-next themes/next

裝好 NexT 後要把 _config.yml 裡面的 theme 改成 next
變更 _config.yml 都要重開 server

Start

接著你只要下 hexo new [標題]
HEXO 就會在 source/_posts 產生對應的 md 檔
接著你就可以用 markdown 開始撰寫你的第一篇文章囉

Reference