前言

因為不小心手殘把 local 的 Hexo 設定砍了… 所以藉此來紀念我的手殘及記錄一下我的 Hexo blog 做了哪些設定


設定 deploy 到 GitHub page 上

安裝套件:

npm install --save hexo-deployer-git

調整 _config.yml

deploy:
  type: git
  repo: <repository url>

NexT

安裝 NexT:

npm install hexo-theme-next --save

將 NexT 的設定檔複製出來:

cp node_modules/hexo-theme-next/_config.yml _config.next.yml

_config.yml 中的 theme 改成使用 NexT:

theme: next

Sitemap

安裝套件:

npm install hexo-generator-sitemap --save

外部連結 nofollow

安裝套件:

npm install hexo-filter-nofollow --save

Minifier

安裝套件:

npm install hexo-all-minifier --save

_config.yml 中加入:

all_minifier: true

搜尋

安裝套件:

npm install hexo-generator-searchdb --save

打開人數統計

busuanzi_countenable 改成 true

busuanzi_count:
  enable: true

使用 Gitalk 當留言板

Gitalk 评论系统

新增 404 頁面

(23) 試著學 Hexo - SEO 篇 - 新增你的 404 頁面

文章置頂

安裝套件:

npm install hexo-generator-topindex --save

參考資料