hexo 更換 theme(主題)

next

clone next theme

1
2
3
4
5
6
npm install hexo-theme-next --save
# copy next config to local
# windows command
copy node_modules\hexo-theme-next\_config.yml _config.next.yml
# linux command
cp node_modules/hexo-theme-next/_config.yml _config.next.yml

or

1
2
3
4
5
6
git clone https://github.com/next-theme/hexo-theme-next themes/next
# copy next config to local
# windows command
copy themes\next\_config.yml _config.next.yml
# linux command
cp themes/next/_config.yml _config.next.yml

_config.yml 設定

設定 theme

1
2
# theme: landscape
theme: next

_config.next.yml 設定

設置菜單

1
2
3
4
5
6
7
8
9
menu:
home: / || fa fa-home
#about: /about/ || fa fa-user
tags: /tags/ || fa fa-tags
categories: /categories/ || fa fa-th
archives: /archives/ || fa fa-archive
#schedule: /schedule/ || fa fa-calendar
#sitemap: /sitemap.xml || fa fa-sitemap
#commonweal: /404/ || fa fa-heartbeat

更改外觀

1
2
3
4
5
# Schemes 外觀
#scheme: Muse
#scheme: Mist
#scheme: Pisces
scheme: Gemini

設定側欄

  • left - 靠左放置
  • right - 靠右放置
1
2
3
4
sidebar:
# Sidebar Position.
position: left
#position: right

設置側欄顯示的時機(only for Muse | Mist)

  • post - 默認行為,在文章頁面(擁有目錄列表)時顯示
  • always - 在所有頁面中都顯示
  • hide - 在所有頁面中都隱藏(可以手動展開)
  • remove - 完全移除
1
2
3
4
5
6
# Sidebar Display (only for Muse | Mist), available values:
# - post expand on posts automatically. Default.
# - always expand for all pages automatically.
# - hide expand only when click on the sidebar toggle icon.
# - remove totally remove sidebar including sidebar toggle.
display: post

設置頭像

放於 source/images/

1
2
3
4
# Sidebar Avatar
avatar:
# Replace the default image and set the url here.
url: /images/head.png #/images/avatar.gif

inside

install inside theme

1
npm install hexo-theme-inside --save

_config.yml 設定 theme

1
2
# theme: landscape
theme: inside