Join the chat at https://gitter.im/LouisBarranqueiro/hexo-theme-tranquilpeak

A gorgeous responsive theme for Hexo blog framework

Tranquilpeak

Quick Start!

Developer documentation

This documentation will help you to understand Tranquilpeak Hexo theme code.

Developer documentation
User documentation

Quick Start

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
1. Run git clone https://github.com/LouisBarranqueiro/hexo-theme-tranquilpeak.git
2. Rename the folder in tranquilpeak and place it in themes folder of your Hexo blog
3. Modify the theme in _config.yml by changing theme variable to tranquilpeak
Go in theme/tranquilpeak folder
$ npm install hexo-cli -g
$ npm install grunt-cli -g
$ npm install bower -g
$ npm install
$ bower install
$ grunt buildProd
--
$ npm run start
$ npm run prod (before deploying your blog)
$ hexo s (start coding!)

Hexo的設置

hexo目錄下的_config.yml修改如下設置:

1
2
theme: tranquilpeak
post_assert_folder: true

tranquilpeak設置

請參考官方文件 User documentation

author設定

languages zh-tw.yml

1
2
3
4
# 你的個人簡介 (支援 Markdown 和 HTML 語法)
bio: "<I am Web developer>"
# 你的工作簡介
job: "<Developer>"

使用分頁(all-categories)頁面

如果文章有分類的話,可以使用all-categories頁面

1
hexo new page all-categories

在source產生一個新的文件夾all-categories,文件夾內的文件index.md修改成如下:

1
2
3
title: "all-categories"
layout: "all-categories"
comments: false

在_config.yml內siderbar的categories的url設置成/all-categories

使用all-tags頁面

如果文章有標籤,可以使用all-tags頁面

1
hexo new page all-tags

在source產生一個新的文件夾all-tags,文件夾內的文件index.md修改成如下:

1
2
3
title: "all-tags"
layout: "all-tags"
comments: false

在_config.yml內siderbar的categories的url設置成/all-tags

使用all-archives頁面

archives是對所有文章按月份分類

1
hexo new page all-archives

在source產生一個新的文件夾all-archives,文件夾內的文件index.md修改成如下:

1
2
3
title: "all-archives"
layout: "all-archives"
comments: false

在_config.yml內siderbar的categories的url設置成/all-archives

個性化的文章內容

1
2
3
4
5
6
7
8
9
10
11
---
title: Tranquilpeak Theme 快速安裝、設定
date: 2017-05-12 12:00:00
categories: Hexo
tags:
- Hexo
keywords:
- hexo
- theme
- tranquilpeak
---

其他

clean

1
$ hexo clean

清除暫存文件,如果發現對網站的更改無論如何也不生效,才可能需要執行(EX: all-tags、all-archives、all-categories)。

參考1
參考2