Skip to content

Commit c931d6b

Browse files
authored
Merge pull request #225 from kakawait/develop
Release 0.4.2
2 parents 31c71da + ded9f96 commit c931d6b

26 files changed

+185
-2181
lines changed

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,28 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [0.4.2-BETA](https://github.com/kakawait/hugo-tranquilpeak-theme/milestone/17) - TBD
6+
7+
- Support [prism.js](http://prismjs.com/) syntax highlighter in addition to _highlight.js_ ([#24](https://github.com/kakawait/hugo-tranquilpeak-theme/issues/24))
8+
- Upgrade external JS dependencies
9+
- Jquery 2.1.3 to 2.2.4 ([#214](https://github.com/kakawait/hugo-tranquilpeak-theme/pull/214))
10+
- Fancybox 2.1.4 to 2.1.7 ([#215](https://github.com/kakawait/hugo-tranquilpeak-theme/pull/215))
11+
- Highlight 9.8.0 to 9.12.0 ([#219](https://github.com/kakawait/hugo-tranquilpeak-theme/pull/219))
12+
- Fix issue where link to every posts is display inside archive ([#203](https://github.com/kakawait/hugo-tranquilpeak-theme/issues/203))
13+
- Fix issue on global property `thumbnailimageposition` which was ignored ([#179](https://github.com/kakawait/hugo-tranquilpeak-theme/issues/179))
14+
- Add global property to allow swapping pagination ([#202](https://github.com/kakawait/hugo-tranquilpeak-theme/pull/202))
15+
16+
### Breaking changes
17+
18+
Since new syntax highlighter prism.js, you have to configure which syntax highlighter you want to use between _highlight.js_ and _prism.js_. **However if you don't configure it, no syntax highligh will be apply** (where previously _highlight.js_ was forced by default).
19+
20+
Please upgrade you're `config.toml` (you can checkout `exampleSite/config.toml` to see sample) to re-add _highlight.js_ as syntax highlighter (except if you don't need it):
21+
22+
```toml
23+
[params]
24+
syntaxHighlighter = "highligth.js"
25+
```
26+
527
## [0.4.1-BETA](https://github.com/kakawait/hugo-tranquilpeak-theme/milestone/16) - 11 sep 2017
628

729
- Fix _sharing options_ link generation bug, that break shares ([#196](https://github.com/kakawait/hugo-tranquilpeak-theme/pull/196))

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Please all the credit should be attributed to [original *Hexo* version](https://
3434
## General
3535

3636
- **Authors**: [Louis Barranqueiro (LouisBarranqueiro)](https://github.com/LouisBarranqueiro) and [Thibaud Leprêtre (kakawait)](https://github.com/kakawait)
37-
- **Version**: 0.4.1-BETA (based on Hexo version 1.10.0)
37+
- **Version**: 0.4.2-BETA(based on Hexo version 1.10.0)
3838
- **Compatibility**: Hugo v0.20.1
3939

4040
## Features

docs/developer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ If you want to report a bug or ask a question, [create an issue](https://github.
2828
## General ##
2929

3030
- **Author** : Thibaud Leprêtre
31-
- **Version** : 0.4.1-BETA (based on Hexo version 1.10.0)
31+
- **Version** : 0.4.2-BETA (based on Hexo version 1.10.0)
3232
- **Compatibility** : Hugo v0.20.1
3333

3434
## Requirements ##

docs/user.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ If you want to report a bug or ask a question, [create an issue](https://github.
5454
## General
5555

5656
- **Authors**: [Louis Barranqueiro (LouisBarranqueiro)](https://github.com/LouisBarranqueiro) and [Thibaud Leprêtre (kakawait)](https://github.com/kakawait)
57-
- **Version**: 0.4.1-BETA (based on Hexo version 1.10.0)
57+
- **Version**: 0.4.2-BETA (based on Hexo version 1.10.0)
5858
- **Compatibility**: Hugo v0.20.1
5959

6060
## Features
@@ -347,6 +347,7 @@ E.g to display a shortcut to open algolia search window :
347347
favicon = /favicon.png
348348
imageGallery = true
349349
hierarchicalCategories = true
350+
syntaxHighlighter = 'highlight.js'
350351
```
351352

352353
| Variable | Description |
@@ -362,6 +363,7 @@ E.g to display a shortcut to open algolia search window :
362363
| hierarchicalCategories | Define categories will create hierarchy between parents: `categories = ["foo", "bar"]` will consider "bar" a sub-category of "foo". If false it will flat categories. |
363364
| customCSS (_DEPRECATED see [Add custom JS or CSS using configuration](#add-custom-js-or-css-using-configuration)_) | Define files with css that override or extend the theme css: `customCSS` = ["css/mystyles.css"]. |
364365
| customJS (_DEPRECATED see [Add custom JS or CSS using configuration](#add-custom-js-or-css-using-configuration)_) | Define files with js that override or extend the theme js: `customJS` = ["js/myscripts.js"]. |
366+
| syntaxHighlighter | Define which syntax highlighter you want to use (if not set syntax highlighting is disable) between `highlight.js` and `prism.js` |
365367

366368
E.g :
367369
A category page look like this with `hierarchicalCategories = true` :
@@ -497,7 +499,7 @@ Follow these steps, to add new filter :
497499

498500
### Prerequisites
499501

500-
Since you are going to edit the theme, you have to install all the necessary to build it after changes : [Installation](https://github.com/LouisBarranqueiro/hexo-theme-tranquilpeak/blob/master/docs/developer.md#installation)
502+
Since you are going to edit the theme, you have to install all the necessary to build it after changes : [Installation](https://github.com/kakawait/hugo-tranquilpeak-theme/blob/master/docs/developer.md#installation)
501503

502504
**Run command in theme folder : `hexo-blog/themes/tranquilpeak`**
503505

@@ -513,7 +515,7 @@ Of course, you can replace it with an other theme found on highlight.js reposito
513515
Follow these steps :
514516

515517
1. Get your theme here : [Highlight.js theme](https://github.com/isagalaev/highlight.js/tree/master/src/styles) or create yours
516-
2. Follow guidelines in `source/scss/themes/hljs-custom.scss` file
518+
2. Follow guidelines in `src/scss/themes/hljs-custom.scss` file
517519
3. Build the theme with `npm run prod` or `grunt buildProd`. Learn more about Grunt tasks : [Grunt tasks](https://github.com/LouisBarranqueiro/hexo-theme-tranquilpeak/blob/master/docs/developer.md#grunt-tasks)
518520

519521
## Writing posts

exampleSite/config.toml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Tranquilpeak
2-
# Version : 0.4.1-BETA
2+
# Version : 0.4.2-BETA
33
# Author : Thibaud Leprêtre
44

55
# I STRONGLY recommend you to use a CDN to speed up loading of pages.
@@ -12,7 +12,7 @@
1212
# For developpers, if you modify this theme, put your images in `source/images` folder and
1313
# use grunt task `build` to synchronize assets
1414

15-
baseurl = ""
15+
baseURL = "https://example.org/"
1616
languageCode = "en-us"
1717
defaultContentLanguage = "en-us"
1818
title = "Hugo tranquilpeak theme"
@@ -107,6 +107,10 @@ canonifyurls = true
107107
# Global keywords configuration. Following keywords will be add to every pages
108108
# keywords = ["development", "next-gen"]
109109

110+
# Syntax highlighter, possible choice between: "highligth.js" (recommanded) and "prism.js" (experimental)
111+
# You can comment it to disable syntax highligthing
112+
syntaxHighlighter = "highligth.js"
113+
110114
# Hide sidebar on all article page to let article take full width to improve reading, and enjoy wide images and cover images. (true: enable, false: disable)
111115
clearReading = true
112116

@@ -166,11 +170,17 @@ canonifyurls = true
166170

167171
# Custom CSS. Put here your custom CSS files. They are loaded after the theme CSS;
168172
# they have to be referred from static root. Example
169-
# customCSS = ["css/foo.css"]
173+
# [[params.customCSS]]
174+
# href = "css/mystyle.css"
170175

171176
# Custom JS. Put here your custom JS files. They are loaded after the theme JS;
172177
# they have to be referred from static root. Example
173-
# customJS = ["js/foo.js"]
178+
# [[params.customJS]]
179+
# src = "js/myscript.js"
180+
181+
# Display `Next` on left side of the pagination, and `Prev` on right side one.
182+
# If you set this value to `true`, these positions swap.
183+
# swapPaginator = true
174184

175185
# Sharing options
176186
# Comment and uncomment to enable or disable sharing options
@@ -200,6 +210,6 @@ canonifyurls = true
200210
# [params.sidebar.profile]
201211
# url = "/#about"
202212

203-
# Customize copyright value "© 2016 <CUSTOMIZATION>. All Rights Reserved"
213+
# Customize copyright value "© 2017 <CUSTOMIZATION>. All Rights Reserved"
204214
# [params.footer]
205215
# copyright = "<a href=\"https://github.com/kakawait\">kakawait</a>"

exampleSite/content/post/Welcome-to-the-new-Tranquilpeak.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Welcome to Tranquilpeak 0.4.1-BETA"
2+
title: "Welcome to Tranquilpeak 0.4.2-BETA"
33
date: 2015-06-15
44
categories:
55
- tranquilpeak
@@ -65,7 +65,7 @@ Please all the credit should be attributed to [original *Hexo* version](https://
6565
## General
6666

6767
- **Authors**: [Louis Barranqueiro (LouisBarranqueiro)](https://github.com/LouisBarranqueiro) and [Thibaud Leprêtre (kakawait)](https://github.com/kakawait)
68-
- **Version**: 0.4.1-BETA (based on Hexo version 1.10.0)
68+
- **Version**: 0.4.2-BETA (based on Hexo version 1.10.0)
6969
- **Compatibility**: Hugo v0.20.1
7070

7171
## Features

i18n/ja.yaml

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
translation: "プロフィール"
2525

2626
- id: "global.author_picture"
27-
translation: "著者の絵"
27+
translation: "プロフィール画像"
2828

2929
- id: "global.share_on"
3030
translation: "%sで共有"
@@ -113,45 +113,54 @@
113113
translation: "ウェブサイトへ"
114114

115115
- id: "post.comment_and_share"
116-
translation: "コメント・シェア"
116+
translation: "コメント・共有"
117117

118118
## FOOTER ##
119119
- id: "footer.all_rights_reserved"
120120
translation: "All Rights Reserved"
121121

122122
## DATE ##
123+
- id: "date.year.suffix"
124+
translation: ""
125+
126+
- id: "date.month.suffix"
127+
translation: ""
128+
129+
- id: "date.day.suffix"
130+
translation: ""
131+
123132
- id: "date.month.january"
124-
translation: "一月"
133+
translation: "1"
125134

126135
- id: "date.month.february"
127-
translation: "二月"
136+
translation: "2"
128137

129138
- id: "date.month.march"
130-
translation: "三月"
139+
translation: "3"
131140

132141
- id: "date.month.april"
133-
translation: "四月"
142+
translation: "4"
134143

135144
- id: "date.month.may"
136-
translation: "五月"
145+
translation: "5"
137146

138147
- id: "date.month.june"
139-
translation: "六月"
148+
translation: "6"
140149

141150
- id: "date.month.july"
142-
translation: "七月"
151+
translation: "7"
143152

144153
- id: "date.month.august"
145-
translation: "八月"
154+
translation: "8"
146155

147156
- id: "date.month.september"
148-
translation: "九月"
157+
translation: "9"
149158

150159
- id: "date.month.october"
151-
translation: "十月"
160+
translation: "10"
152161

153162
- id: "date.month.november"
154-
translation: "十一月"
163+
translation: "11"
155164

156165
- id: "date.month.december"
157-
translation: "十二月"
166+
translation: "12"

i18n/vi.yaml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
translation: "Thông tin"
2525

2626
- id: "global.author_picture"
27-
translation: "Ảnh đại diện của tác giả"
27+
translation: "Ảnh đại diện"
2828

2929
- id: "global.share_on"
3030
translation: "Chia sẻ với %s"
@@ -104,54 +104,54 @@
104104
translation: "THẺ ĐÁNH DẤU"
105105

106106
- id: "post.toc"
107-
translation: "Phụ lục"
107+
translation: "Mục lục"
108108

109109
- id: "post.read_more"
110110
translation: "Đọc tiếp..."
111111

112112
- id: "post.go_to_website"
113-
translation: "Đi tới website"
113+
translation: "Chuyển tới trang"
114114

115115
- id: "post.comment_and_share"
116-
translation: "Comment và chia sẻ"
116+
translation: "Bình luận và chia sẻ"
117117

118118
## FOOTER ##
119119
- id: "footer.all_rights_reserved"
120120
translation: "All Rights Reserved"
121121

122122
## DATE ##
123123
- id: "date.month.january"
124-
translation: "Tháng một"
124+
translation: "tháng 1"
125125

126126
- id: "date.month.february"
127-
translation: "Tháng hai"
127+
translation: "tháng 2"
128128

129129
- id: "date.month.march"
130-
translation: "Tháng ba"
130+
translation: "tháng 3"
131131

132132
- id: "date.month.april"
133-
translation: "Tháng tư"
133+
translation: "tháng 4"
134134

135135
- id: "date.month.may"
136-
translation: "Tháng năm"
136+
translation: "tháng 5"
137137

138138
- id: "date.month.june"
139-
translation: "Tháng sáu"
139+
translation: "tháng 6"
140140

141141
- id: "date.month.july"
142-
translation: "Tháng bảy"
142+
translation: "tháng 7"
143143

144144
- id: "date.month.august"
145-
translation: "Tháng tám"
145+
translation: "tháng 8"
146146

147147
- id: "date.month.september"
148-
translation: "Tháng chín"
148+
translation: "tháng 9"
149149

150150
- id: "date.month.october"
151-
translation: "Tháng mười"
151+
translation: "tháng 10"
152152

153153
- id: "date.month.november"
154-
translation: "Tháng mười một"
154+
translation: "tháng 11"
155155

156156
- id: "date.month.december"
157-
translation: "Tháng mười hai"
157+
translation: "tháng 12"

layouts/_default/summary.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
{{ end }}
1818
{{ end }}
1919
{{ end }}
20-
{{ if and (.Scratch.Get "thumbnailImage") .Params.thumbnailimageposition }}
21-
{{ .Scratch.Set "thumbnailImagePosition" .Params.thumbnailimageposition }}
20+
{{ if or .Params.thumbnailimageposition .Site.Params.thumbnailimageposition }}
21+
{{ .Scratch.Set "thumbnailImagePosition" (.Params.thumbnailimageposition | default .Site.Params.thumbnailimageposition) }}
2222
{{ else }}
2323
{{ .Scratch.Set "thumbnailImagePosition" "bottom" }}
2424
{{ end }}

layouts/partials/archive-post.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ <h5 class="archive-result text-color-base text-xlarge" data-message-zero="{{ i18
33
{{ range .GroupByDate "2006" }}
44
{{ $year := .Key }}
55
<div class="archive archive-year box" data-date="{{ $year }}">
6-
<h4 class="archive-title" style="text-decoration: none;">{{ $year }}</h4>
6+
<h4 class="archive-title" style="text-decoration: none;">{{ $year }}{{ if i18n "date.year.suffix" }}{{ i18n "date.year.suffix" }}{{ end }}</h4>
77
{{ range .Pages.GroupByDate "01-January" }}
88
<ul class="archive-posts archive-month" data-date="{{ $year }}{{ range first 1 (split .Key "-") }}{{ . }}{{ end }}">
9-
<h5 class="archive-title" style="text-decoration: none;">{{ range last 1 (split .Key "-") }}{{ i18n (lower (printf "date.month.%s" .)) }}{{ end }}</h5>
9+
<h5 class="archive-title" style="text-decoration: none;">{{ range last 1 (split .Key "-") }}{{ i18n (lower (printf "date.month.%s" .)) }}{{ if i18n "date.month.suffix" }}{{ i18n "date.month.suffix" }}{{ end }}{{ end }}</h5>
1010
{{ range .Pages }}
1111
<li class="archive-post archive-day" data-date="{{ dateFormat "20060102" .Date }}">
1212
<a class="archive-post-title" href="{{ .Permalink }}">{{ .Title }}</a>

0 commit comments

Comments
 (0)