Skip to content

Commit 233b46a

Browse files
authored
Merge pull request #115 from kakawait/develop
Releasing 0.2.2-ALPHA
2 parents 6f3d8f4 + 0144763 commit 233b46a

File tree

12 files changed

+109
-31
lines changed

12 files changed

+109
-31
lines changed

CHANGELOG.md

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

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

5+
## [0.2.2-ALPHA](https://github.com/kakawait/hugo-tranquilpeak-theme/milestone/11) - 14 feb 2017
6+
7+
- Page archetype ([#106](https://github.com/kakawait/hugo-tranquilpeak-theme/issues/106)) (thank you [@ebouchut](https://github.com/ebouchut))
8+
- Improve documentation ([#113](https://github.com/kakawait/hugo-tranquilpeak-theme/issues/113), [#105](https://github.com/kakawait/hugo-tranquilpeak-theme/pull/105)) (thank you [@ebouchut](https://github.com/ebouchut))
9+
- Update brazilian translation ([#101](https://github.com/kakawait/hugo-tranquilpeak-theme/pull/101)) (thank you [@italocegatta](https://github.com/italocegatta))
10+
511
## [0.2.1-ALPHA](https://github.com/kakawait/hugo-tranquilpeak-theme/milestone/10) - 8 jan 2017
612

713
- Easy customization of head and foot via `/layouts/partials/(head|foot)_(start|end).html` ([#80](https://github.com/kakawait/hugo-tranquilpeak-theme/pull/80)) (thank you [@blaubaer](https://github.com/blaubaer))

README.md

Lines changed: 3 additions & 3 deletions
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.2.1-ALPHA (based on Hexo version 1.9.1)
37+
- **Version**: 0.2.2-ALPHA (based on Hexo version 1.9.1)
3838
- **Compatibility**: Hugo v0.17
3939

4040
## Features
@@ -75,7 +75,7 @@ Please all the credit should be attributed to [original *Hexo* version](https://
7575
- [ ] Duoshuo
7676
- [ ] Baidu analytics
7777
- [ ] Algolia (https://github.com/kakawait/hugo-tranquilpeak-theme/issues/8)
78-
- [ ] Pagination custumization `tagPagination`, `categoryPagination` and `archivePagination` (https://github.com/kakawait/hugo-tranquilpeak-theme/issues/17)
78+
- [ ] Pagination customization `tagPagination`, `categoryPagination` and `archivePagination` (https://github.com/kakawait/hugo-tranquilpeak-theme/issues/17)
7979

8080
**ATTENTION** following features will not be possible due to *Hugo* limitations
8181

@@ -147,7 +147,7 @@ As explained on [Credits](#credits):
147147

148148
> *Hugo* version keeps every `.js` and `.css` files untouched from original *Hexo* version in order to enjoy futur original *Hexo* version updates or features!
149149
150-
That mean I would keep a stronge 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*).
150+
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*).
151151

152152
## License
153153

archetypes/page.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: "New Page"
3+
categories:
4+
- category
5+
- subcategory
6+
tags:
7+
- tag1
8+
- tag2
9+
keywords:
10+
- tech
11+
comments: false
12+
showDate: false
13+
showSocial: false
14+
showTags: false
15+
showPagination: false
16+
#thumbnailImage: //example.com/image.jpg
17+
---
18+

archetypes/post.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ keywords:
1212
#thumbnailImage: //example.com/image.jpg
1313
---
1414

15-
<!-- more /-->
15+
<!--more-->

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.2.1-ALPHA (based on Hexo version 1.9.1)
31+
- **Version** : 0.2.2-ALPHA (based on Hexo version 1.9.1)
3232
- **Compatibility** : Hugo v0.17
3333

3434
## Requirements ##

docs/user.md

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,13 @@ If you want to report a bug or ask a question, [create an issue](https://github.
4747
* [Tabbed code block](#tabbed-code-block)
4848
* [Wide image](#wide-image)
4949
* [Fancybox](#fancybox)
50+
- [Writing pages](#writing-pages)
5051
- [Running](#running)
5152

5253
## General
5354

5455
- **Authors**: [Louis Barranqueiro (LouisBarranqueiro)](https://github.com/LouisBarranqueiro) and [Thibaud Leprêtre (kakawait)](https://github.com/kakawait)
55-
- **Version**: 0.2.1-ALPHA (based on Hexo version 1.9.1)
56+
- **Version**: 0.2.2-ALPHA (based on Hexo version 1.9.1)
5657
- **Compatibility**: Hugo v0.17
5758

5859
## Features
@@ -482,6 +483,7 @@ comments: false
482483
showTags: true
483484
showPagination: true
484485
showSocial: true
486+
showDate: true
485487
```
486488

487489
|Variable|Description|
@@ -499,6 +501,7 @@ showSocial: true
499501
|coverMeta|`in`: display post meta (title, date and categories) on cover image, `out`: display meta (title, date and categories) under cover image as usual. Default behavior : `in`|
500502
|gallery|Images displayed in an image gallery (with fancybox) at the end of the post. If thumbnail image is not configured and cover image too, the first photo is used as thumbnail image. format: `original url [thumbnail url] [caption]`, E.g : `https://example.com/original.jpg https://example.com/thumbnail.jpg "New York"`|
501503
|comments|Disable the comment of the post.
504+
|showDate|`true`: Show the date when `true` (default)|
502505
|showTags|`true`: show tags of this page. Default behavior: `true`
503506
|showPagination|`true`: show pagination. Default behavior: `true`
504507
|showSocial|`true`: show social button such as share on Twitter, Facebook... Default behavior: `true`
@@ -517,11 +520,11 @@ The same with : `thumbnailImagePosition` set to `left`:
517520

518521
Use:
519522

520-
- `<!-- more -->` to define post excerpt and keep the post excerpt in the post content
523+
- `<!--more-->` to define post excerpt and keep the post excerpt in the post content
521524

522525
### Display table of contents
523526

524-
As post excerpt feature enable with `<!-- more -->` comment, you can display the table of contents of a post with `<!-- toc -->`. Place this comment where you want to display the table of content.
527+
As post excerpt feature enable with `<!--more-->` comment, you can display the table of contents of a post with `<!-- toc -->`. Place this comment where you want to display the table of content.
525528

526529
Here is what looks like the table of contents generated:
527530
![thumbnail-image-position-left](https://s3-ap-northeast-1.amazonaws.com/tranquilpeak-hexo-theme/docs/1.4.0/toc-400.png)
@@ -660,6 +663,48 @@ E.g:
660663
|src|Path to the original image.|
661664
|title (optional)|Title of image displayed in a caption under image. `Alt` HTML attribute will use this title. E.g : `"A beautiful sunrise"`.|
662665
666+
667+
## Writing pages ##
668+
669+
Sometimes you need to create a **page** that is **not** a **regular blog post**,
670+
where you want to hide the date, social sharing buttons, tags, categories
671+
and pagination.
672+
This is the case for the blog pages _About_ or _Contact_ for instance which do
673+
not need to be timestamped (nor tagged or categorized) nor provide
674+
pagination and are not intended to be shared on social networks.
675+
676+
In order to create such a page you can proceed like so:
677+
678+
```
679+
hugo new page/contact.md
680+
```
681+
682+
This creates the file `contact.md` in the directory `content/page`
683+
pre-populated with the following front matter.
684+
685+
```yaml
686+
---
687+
title: "New Page"
688+
categories:
689+
- category
690+
- subcategory
691+
tags:
692+
- tag1
693+
- tag2
694+
keywords:
695+
- tech
696+
comments: false
697+
showDate: false
698+
showSocial: false
699+
showTags: false
700+
showPagination: false
701+
#thumbnailImage: //example.com/image.jpg
702+
---
703+
704+
```
705+
706+
The rest is basically the same as for a regular _[post](#writing-posts)_.
707+
663708
## Running ##
664709
665710
Run `hugo server` and start writing! :)

exampleSite/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Tranquilpeak
2-
# Version : 0.2.1-ALPHA
2+
# Version : 0.2.2-ALPHA
33
# Author : Thibaud Leprêtre
44

55
# I STRONGLY recommend you to use a CDN to speed up loading of pages.

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.2.1"
2+
title: "Welcome to Tranquilpeak 0.2.2"
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.2.1-ALPHA (based on Hexo version 1.9.1)
68+
- **Version**: 0.2.2-ALPHA (based on Hexo version 1.9.1)
6969
- **Compatibility**: Hugo v0.17
7070

7171
## Features

i18n/pt-br.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
translation: "Categorias"
77

88
- id: "global.category"
9-
translation: "Category"
9+
translation: "Categoria"
1010

1111
- id: "global.tags"
1212
translation: "Tags"
@@ -45,19 +45,19 @@
4545
translation: "LinkedIn"
4646

4747
- id: "global.mail"
48-
translation: "Mail"
48+
translation: "Email"
4949

5050
- id: "global.rss"
5151
translation: "RSS"
5252

5353
- id: "global.share_on_google_plus"
54-
translation: "Partilhar no Google Plus"
54+
translation: "Compartilhar no Google Plus"
5555

5656
- id: "global.share_on_facebook"
57-
translation: "Partilhar no Facebook"
57+
translation: "Compartilhar no Facebook"
5858

5959
- id: "global.share_on_twitter"
60-
translation: "Partilhar no Twitter"
60+
translation: "Compartilhar no Twitter"
6161

6262
- id: "global.search_category"
6363
translation: "Pesquisar categoria"
@@ -73,30 +73,30 @@
7373
translation: "não foram encontrados artigos"
7474

7575
- id: "global.post_found.one"
76-
translation: "1 artigo encontrados"
76+
translation: "1 artigo encontrado"
7777

7878
- id: "global.post_found.other"
7979
translation: "{n} artigos encontrados"
8080

8181
## GLOBAL.CATEGORIES_FOUND ##
8282
- id: "global.categories_found.zero"
83-
translation: "não foram encontrados categorias"
83+
translation: "não foram encontradas categorias"
8484

8585
- id: "global.categories_found.one"
86-
translation: "1 category encontrados"
86+
translation: "1 categoria encontrada"
8787

8888
- id: "global.categories_found.other"
89-
translation: "{n} categorias encontrados"
89+
translation: "{n} categorias encontradas"
9090

9191
## GLOBAL.TAGS_FOUND ##
9292
- id: "global.tags_found.zero"
93-
translation: "não foram encontrados tag"
93+
translation: "não foram encontradas tags"
9494

9595
- id: "global.tags_found.one"
96-
translation: "1 tag encontrados"
96+
translation: "1 tag encontrada"
9797

9898
- id: "global.tags_found.other"
99-
translation: "{n} tags encontrados"
99+
translation: "{n} tags encontradas"
100100

101101
## PAGINATION ##
102102
- id: "pagination.page"
@@ -128,7 +128,7 @@
128128
translation: "ETIQUETADO em"
129129

130130
- id: "post.toc"
131-
translation: "Tabela de Conteúdos"
131+
translation: "Conteúdo"
132132

133133
- id: "post.read_more"
134134
translation: "Continuar leitura"

layouts/partials/head.html

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,15 @@
99
{{ else }}
1010
{{ .Scratch.Set "sidebarBehavior" .Site.Params.sidebarBehavior }}
1111
{{ end }}
12+
<!-- Fix hugo 0.17 expects ".Site.Author.gravatarEmail" whereas hugo 0.18 expects ".Site.Author.gravataremail" -->
13+
{{ if .Site.Author.gravatarEmail }}
14+
{{ .Scratch.Set "gravatarEmail" .Site.Author.gravatarEmail }}
15+
{{ end }}
1216
{{ if .Site.Author.gravataremail }}
13-
{{ .Scratch.Set "authorPicture" (printf "//www.gravatar.com/avatar/%s" (urlize (md5 .Site.Author.gravataremail))) }}
17+
{{ .Scratch.Set "gravatarEmail" .Site.Author.gravataremail }}
18+
{{ end }}
19+
{{ if .Scratch.Get "gravatarEmail" }}
20+
{{ .Scratch.Set "authorPicture" (printf "//www.gravatar.com/avatar/%s" (urlize (md5 (.Scratch.Get "gravatarEmail")))) }}
1421
{{ else if .Site.Author.picture }}
1522
{{ .Scratch.Set "authorPicture" (absURL .Site.Author.picture) }}
1623
{{ end }}
@@ -54,8 +61,8 @@
5461
{{ end }}
5562
{{ end }}
5663

57-
{{ if .Site.Author.gravataremail }}
58-
<meta property="og:image" content="//www.gravatar.com/avatar/{{ (md5 .Site.Author.gravataremail) | urlize }}?s=640">
64+
{{ if .Scratch.Get "gravatarEmail" }}
65+
<meta property="og:image" content="//www.gravatar.com/avatar/{{ (md5 (.Scratch.Get "gravatarEmail")) | urlize }}?s=640">
5966
{{ else if .Site.Author.picture }}
6067
<meta property="og:image" content="{{ .Site.Author.picture | absURL }}">
6168
{{ end }}

0 commit comments

Comments
 (0)