# Hexo theme

Hexo 有非常多的主題可以套用,可以從 https://hexo.io/themes/ 挑選喜歡的主題。

# Shoka

我使用的 theme 叫 Shoka (書架),下面介紹怎麼安裝 Shoka 主題

作者網站 https://shoka.lostyu.me/

GitHub https://github.com/amehime/hexo-theme-shoka

使用教學 https://shoka.lostyu.me/computer-science/note/theme-shoka-doc/

# 安裝 shoka

切換到專案目錄,執行下面指令,使用 git 複製 shoka 原始碼到專案目錄下的 themes/shoka 資料夾

git clone https://github.com/amehime/hexo-theme-shoka.git ./themes/shoka

# 安裝 shoka 相依套件

根據 Theme Shoka Dependents 說明,安裝相依套件前要先移除 hexo-renderer-marked

執行下列指令前,確認已切換到專案目錄內

移除 hexo-renderer-marked

yarn remove hexo-renderer-marked

安裝其他相依套件

yarn add \
    hexo-renderer-multi-markdown-it \
    hexo-autoprefixer \
    hexo-algoliasearch \
    hexo-symbols-count-time \
    hexo-feed

# 套用主題

修改專案資料夾內 _config.yml 檔案,把 theme 改為 shoka

theme: shoka

之後執行 hexo server

開啟 http://localhost:4000 就可以看到套用的效果

# 其他

其他關於 Shoka 的說明可參考下面網址
https://shoka.lostyu.me/categories/computer-science/note/theme-shoka-doc/