Skip to content

Commit fbf3239

Browse files
authored
Merge pull request #477 from kakawait/develop
Release 0.5.0-BETA
2 parents 1ab6967 + 4764230 commit fbf3239

File tree

104 files changed

+6170
-3483
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+6170
-3483
lines changed

.github/CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Contributing #
1+
# Contributing
22

33
All kinds of contributions (enhancements, new features, documentation & code improvements, issues & bugs reporting) are welcome.
44

5-
## Code style ##
5+
## Code style
66

77
### Javascript
88

@@ -13,11 +13,11 @@ Check code status with:
1313
npm run lint
1414
```
1515

16-
## Issues ##
16+
## Issues
1717

1818
When you create an issue to report a bug or ask a question, please fill template information, except if is **really not relevant**. And all others related information that are susceptible to help us.
1919

20-
## Pull requests ##
20+
## Pull requests
2121

2222
All pull requests must be done on the **develop** branch.
2323

CHANGELOG.md

Lines changed: 232 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,238 @@
22

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

5-
## [0.4.8-BETA](https://github.com/kakawait/hugo-tranquilpeak-theme/milestone/23) - 29 mai 2020
5+
## [0.5.0-BETA](https://github.com/kakawait/hugo-tranquilpeak-theme/milestone/5) - 14 aug 2021
6+
7+
### Forwords
8+
9+
> Theme activities were pretty low since 2019. I maintain the theme on my free time and in 2019 I became a dad. You may (or not) understand that it was hard for me to find time to maintain the project.
10+
>
11+
> I recently find a great motiviation to re-maintain with more frequent updates and releases!
12+
>Some big changes will comes to try to use latest Hugo's improvements and features.
13+
> The goal is to release the `1.0.0` for the end of this year.
14+
15+
I'd like to thank every existing contributors. And not only people that pushing code.
16+
During that period, I've seen some people trying to help other people on issue! I really appreciate.
17+
18+
If you'd like to start helping you can firstly look on that list of labelled issues [good first issue, ideal for contribution, help wanted](https://github.com/kakawait/hugo-tranquilpeak-theme/issues?q=is%3Aopen+label%3A%22good+first+issue%22%2C%22ideal+for+contribution%22%2C%22help+wanted%22)
19+
20+
---
21+
22+
- Synch from Hexo Tranquilpeak theme 3.1.0 ([#287](https://github.com/kakawait/hugo-tranquilpeak-theme/issues/287))
23+
- Check https://github.com/LouisBarranqueiro/hexo-theme-tranquilpeak/releases to get more informations
24+
- Notables changes:
25+
- Update Font Awesome to v5
26+
- Accessibility: add `aria-label` HTML attribute to links
27+
- Close about page when clicking on its background
28+
- Add Gitalk comment component
29+
- Revamp sidebar translation in order to use `transform3d` which is way more efficiant in term of performance ([#364](https://github.com/kakawait/hugo-tranquilpeak-theme/pull/364))
30+
- De-hardcode main section as recommended in [Hugo documentation](https://gohugo.io/functions/where/#mainsections) ([#444](https://github.com/kakawait/hugo-tranquilpeak-theme/issues/444))
31+
- Create a new shortcode `{{< toc >}}` to replace previous HTML comment `<!-- toc -->` that does not work anymore with latest Hugo's markdown engine ([#395](https://github.com/kakawait/hugo-tranquilpeak-theme/issues/395))
32+
- Update every 3rd party dependencies (except MathJax<sup id="fnr1">[*](#fnt1)</sup>):
33+
- highlight.js `9.12.0` -> `11.1.0`
34+
- jQuery `2.2.4` -> `3.6.0`
35+
- jQuery fancybox `2.1.4` -> `3.5.7`
36+
- prism `1.8.3` -> `1.24.1`
37+
- font-awesome `4.7.0` -> `5.15.3`
38+
- Add touch event support for closing sidebar when opened ([#475](https://github.com/kakawait/hugo-tranquilpeak-theme/pull/475))
39+
40+
<b id="fnt1">*</b> I'm not using Math's stuffs at all, so it's hard for me to check no-regression. That why I'm looking for some help by creating a new post that expose Math feature. See issue [#478](https://github.com/kakawait/hugo-tranquilpeak-theme/issues/478). [](#fnr1)
41+
42+
### Breaking changes
43+
44+
#### Update Font Awesome to v5
45+
46+
Hugo Tranquilpeak now uses Font Awesome v5. In this new version, Font Awesome has separated web fonts in 3 categories: regular, solid and brands. Because of that, you now have to update your icons in the sidebar configuration and sharing options in the theme configuration to tell Font Awesome in which web fonts your icons are:
47+
48+
- fa: for regular and solid icon
49+
- fas: for solid icon only
50+
- far: for regular icon only
51+
- fab: for brand icons
52+
53+
Some icon names have also changed, so if at the end of the process, some icons are not displayed, make sure they still exist here: Font Awesome v5 - icons
54+
55+
Here is an example to help you upgrade to the new version:
56+
57+
**Before (`config.toml`):**
58+
59+
```toml
60+
# ------------
61+
# Sidebar menu
62+
# ------------
63+
[[menu.main]]
64+
weight = 1
65+
identifier = "home"
66+
name = "Home"
67+
pre = "<i class=\"sidebar-button-icon fa fa-lg fa-home\"></i>"
68+
url = "/"
69+
[[menu.main]]
70+
weight = 2
71+
identifier = "categories"
72+
name = "Categories"
73+
pre = "<i class=\"sidebar-button-icon fa fa-lg fa-bookmark\"></i>"
74+
url = "/categories"
75+
[[menu.main]]
76+
weight = 3
77+
identifier = "tags"
78+
name = "Tags"
79+
pre = "<i class=\"sidebar-button-icon fa fa-lg fa-tags\"></i>"
80+
url = "/tags"
81+
[[menu.main]]
82+
weight = 4
83+
identifier = "archives"
84+
name = "Archives"
85+
pre = "<i class=\"sidebar-button-icon fa fa-lg fa-archive\"></i>"
86+
url = "/archives"
87+
[[menu.main]]
88+
weight = 5
89+
identifier = "about"
90+
name = "About"
91+
pre = "<i class=\"sidebar-button-icon fa fa-lg fa-question\"></i>"
92+
url = "/#about"
93+
94+
[[menu.links]]
95+
weight = 1
96+
identifier = "github"
97+
name = "GitHub"
98+
pre = "<i class=\"sidebar-button-icon fa fa-lg fa-github\"></i>"
99+
url = "https://github.com/kakawait"
100+
[[menu.links]]
101+
weight = 2
102+
identifier = "stackoverflow"
103+
name = "Stack Overflow"
104+
pre = "<i class=\"sidebar-button-icon fa fa-lg fa-stack-overflow\"></i>"
105+
url = "https://stackoverflow.com/users/636472/kakawait"
106+
107+
[[menu.misc]]
108+
weight = 1
109+
identifier = "rss"
110+
name = "RSS"
111+
pre = "<i class=\"sidebar-button-icon fa fa-lg fa-rss\"></i>"
112+
url = "/index.xml"
113+
114+
[params]
115+
# Sharing options
116+
# Comment and uncomment to enable or disable sharing options
117+
# If you wanna add a sharing option, read user documentation :
118+
# Tranquilpeak configuration > Theme configuration > sharing-options
119+
[[params.sharingOptions]]
120+
name = "Facebook"
121+
icon = "fa-facebook-official"
122+
url = "https://www.facebook.com/sharer/sharer.php?u=%s"
123+
124+
[[params.sharingOptions]]
125+
name = "Twitter"
126+
icon = "fa-twitter"
127+
url = "https://twitter.com/intent/tweet?text=%s"
128+
129+
[[params.sharingOptions]]
130+
name = "Google+"
131+
icon = "fa-google-plus"
132+
url = "https://plus.google.com/share?url=%s"
133+
```
134+
135+
**After (`config.toml`):**
136+
137+
```toml
138+
# ------------
139+
# Sidebar menu
140+
# ------------
141+
[[menu.main]]
142+
weight = 1
143+
identifier = "home"
144+
name = "Home"
145+
pre = "<i class=\"sidebar-button-icon fas fa-lg fa-home\" aria-hidden=\"true\"></i>"
146+
url = "/"
147+
[[menu.main]]
148+
weight = 2
149+
identifier = "categories"
150+
name = "Categories"
151+
pre = "<i class=\"sidebar-button-icon fas fa-lg fa-bookmark\" aria-hidden=\"true\"></i>"
152+
url = "/categories"
153+
[[menu.main]]
154+
weight = 3
155+
identifier = "tags"
156+
name = "Tags"
157+
pre = "<i class=\"sidebar-button-icon fas fa-lg fa-tags\" aria-hidden=\"true\"></i>"
158+
url = "/tags"
159+
[[menu.main]]
160+
weight = 4
161+
identifier = "archives"
162+
name = "Archives"
163+
pre = "<i class=\"sidebar-button-icon fas fa-lg fa-archive\" aria-hidden=\"true\"></i>"
164+
url = "/archives"
165+
[[menu.main]]
166+
weight = 5
167+
identifier = "about"
168+
name = "About"
169+
pre = "<i class=\"sidebar-button-icon fas fa-lg fa-question\" aria-hidden=\"true\"></i>"
170+
url = "/#about"
171+
172+
[[menu.links]]
173+
weight = 1
174+
identifier = "github"
175+
name = "GitHub"
176+
pre = "<i class=\"sidebar-button-icon fab fa-lg fa-github\" aria-hidden=\"true\"></i>"
177+
url = "https://github.com/kakawait"
178+
[[menu.links]]
179+
weight = 2
180+
identifier = "stackoverflow"
181+
name = "Stack Overflow"
182+
pre = "<i class=\"sidebar-button-icon fab fa-lg fa-stack-overflow\" aria-hidden=\"true\"></i>"
183+
url = "https://stackoverflow.com/users/636472/kakawait"
184+
185+
[[menu.misc]]
186+
weight = 1
187+
identifier = "rss"
188+
name = "RSS"
189+
pre = "<i class=\"sidebar-button-icon fas fa-lg fa-rss\" aria-hidden=\"true\"></i>"
190+
url = "/index.xml"
191+
192+
[params]
193+
# ---------------
194+
# Sharing options
195+
# ---------------
196+
# Comment and uncomment to enable or disable sharing options
197+
# If you wanna add a sharing option, read user documentation :
198+
# Tranquilpeak configuration > Theme configuration > sharing-options
199+
[[params.sharingOptions]]
200+
name = "Facebook"
201+
icon = "fab fa-facebook-square"
202+
url = "https://www.facebook.com/sharer/sharer.php?u=%s"
203+
204+
[[params.sharingOptions]]
205+
name = "Twitter"
206+
icon = "fab fa-twitter"
207+
url = "https://twitter.com/intent/tweet?text=%s"
208+
209+
# Removed Google+ because service was shutdown
210+
```
211+
212+
#### Main section
213+
214+
Until now, Hugo Tranquilpeak was using hardcoded main section `post`. That force you to have the following content structure:
215+
216+
```
217+
content/
218+
post/
219+
your-post.md
220+
other-post.md
221+
```
222+
223+
Since `0.5.0-BETA` Hugo tranquilpeak will now follow official recommendation https://gohugo.io/functions/where/#mainsections.
224+
225+
You can configure your main(s) section(s) from `config.toml`
226+
227+
```toml
228+
[params]
229+
mainSections = ['posts']
230+
```
231+
232+
but by default
233+
234+
> If the user has not set this config parameter in their site config, it will default to the section with the most pages.
235+
236+
## [0.4.8-BETA](https://github.com/kakawait/hugo-tranquilpeak-theme/milestone/23) - 29 may 2020
6237

7238
- Fix regression from Hugo 0.71 ([#429](https://github.com/kakawait/hugo-tranquilpeak-theme/issues/429))
8239

README.md

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,6 @@ You can track [breaking changes label](https://github.com/kakawait/hugo-tranquil
1414

1515
How can I migrate my current version? Please read [CHANGELOG.md](https://github.com/kakawait/hugo-tranquilpeak-theme/blob/master/CHANGELOG.md).
1616

17-
## Credits
18-
19-
*Hugo* version of Tranquilpeak is a based on original *Hexo* version https://github.com/LouisBarranqueiro/hexo-theme-tranquilpeak. This version is simply a port to *Hugo* static site generator.
20-
21-
Please all the credit should be attributed to [original *Hexo* version](https://github.com/LouisBarranqueiro/hexo-theme-tranquilpeak) and its author [Louis Barranqueiro](https://github.com/LouisBarranqueiro).
22-
23-
*Hugo* version keeps every `.js` and `.css` files untouched from original *Hexo* version in order to enjoy future original *Hexo* version updates or features!
24-
2517
## Summary
2618

2719
- [General](#general)
@@ -35,8 +27,8 @@ Please all the credit should be attributed to [original *Hexo* version](https://
3527

3628
## General
3729

38-
- **Authors**: [Louis Barranqueiro (LouisBarranqueiro)](https://github.com/LouisBarranqueiro) and [Thibaud Leprêtre (kakawait)](https://github.com/kakawait)
39-
- **Version**: 0.4.8-BETA (based on Hexo version 1.10.0)
30+
- **Authors**: [Thibaud Leprêtre (kakawait)](https://github.com/kakawait) and [Louis Barranqueiro (LouisBarranqueiro)](https://github.com/LouisBarranqueiro)
31+
- **Version**: 0.5.0-BETA (based on Hexo version 3.1.0)
4032
- **Compatibility**: Hugo v0.53
4133

4234
## Features
@@ -68,13 +60,13 @@ Please all the credit should be attributed to [original *Hexo* version](https://
6860
**Integrated services:**
6961

7062
- Disqus
63+
- Gitlak
7164
- Google analytics
7265
- Gravatar
7366
- Facebook Insights
7467

7568
### Missing features from original *Hexo* version
7669

77-
- [ ] Baidu analytics
7870
- [ ] Algolia (https://github.com/kakawait/hugo-tranquilpeak-theme/issues/8)
7971
- [ ] Pagination customization `tagPagination`, `categoryPagination` and `archivePagination` (https://github.com/kakawait/hugo-tranquilpeak-theme/issues/17)
8072

@@ -140,15 +132,13 @@ To understand the code, the workflow and edit the theme, consult the following d
140132

141133
## Contributing
142134

143-
All kinds of contributions (enhancements, new features, documentation & code improvements, issues & bugs reporting) are welcome.
135+
All kinds of contributions (enhancements, features, documentation & code improvements, bugs reporting) are welcome.
144136

145137
Read [guidelines for contributing](https://github.com/kakawait/hugo-tranquilpeak-theme/blob/master/.github/CONTRIBUTING.md) for more information.
146138

147-
As explained on [Credits](#credits):
148-
149-
> *Hugo* version keeps every `.js` and `.css` files untouched from original *Hexo* version in order to enjoy future original *Hexo* version updates or features!
139+
## Credits
150140

151-
That mean I would keep a strong dependency with original *Hexo* theme. Thus if you want to suggest any modifications on `.css` or `.js` files **I will submit those changes to original *Hexo* theme** (except if it's really specific to *Hugo* bugs that is not present on *Hexo*).
141+
*Hugo* version of Tranquilpeak is a based on original *Hexo* version https://github.com/LouisBarranqueiro/hexo-theme-tranquilpeak. This version is simply a port to *Hugo* static site generator.
152142

153143
## License
154144

docs/developer.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,26 @@ If you want to report a bug or ask a question, [create an issue](https://github.
1111
- [Installation](#installation)
1212
- [Code style](#code-style)
1313
- [Code structure](#code-structure)
14-
* [Views](#views)
15-
* [Assets](#assets)
16-
* [Stylesheets](#stylesheets)
17-
* [Images](#images)
18-
* [Javascript](#javascript)
14+
- [Views](#views)
15+
- [Assets](#assets)
16+
- [Stylesheets](#stylesheets)
17+
- [Images](#images)
18+
- [Javascript](#javascript)
1919
- [NPM scripts](#npm-scripts)
2020
- [Grunt tasks](#grunt-tasks)
21-
* [Tasks structure](#tasks-structure)
22-
* [Pipeline](#pipeline)
23-
* [Config tasks](#config-tasks)
24-
* [Register tasks](#register-tasks)
21+
- [Tasks structure](#tasks-structure)
22+
- [Pipeline](#pipeline)
23+
- [Config tasks](#config-tasks)
24+
- [Register tasks](#register-tasks)
2525
- [Build](#build)
26+
- [Development environment](#development-environment)
27+
- [Production environment (before deploying your blog)](#production-environment-before-deploying-your-blog)
2628
- [Running](#running)
2729

2830
## General ##
2931

3032
- **Author** : Thibaud Leprêtre
31-
- **Version** : 0.4.8-BETA (based on Hexo version 1.10.0)
33+
- **Version** : 0.5.0-BETA (based on Hexo version 3.1.0)
3234
- **Compatibility** : Hugo v0.53
3335

3436
## Requirements ##

0 commit comments

Comments
 (0)