Skip to content

Commit

Permalink
Merge pull request #115 from kakawait/develop
Browse files Browse the repository at this point in the history
Releasing 0.2.2-ALPHA
  • Loading branch information
kakawait authored Feb 14, 2017
2 parents 6f3d8f4 + 0144763 commit 233b46a
Show file tree
Hide file tree
Showing 12 changed files with 109 additions and 31 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

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

## [0.2.2-ALPHA](https://github.com/kakawait/hugo-tranquilpeak-theme/milestone/11) - 14 feb 2017

- Page archetype ([#106](https://github.com/kakawait/hugo-tranquilpeak-theme/issues/106)) (thank you [@ebouchut](https://github.com/ebouchut))
- 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))
- Update brazilian translation ([#101](https://github.com/kakawait/hugo-tranquilpeak-theme/pull/101)) (thank you [@italocegatta](https://github.com/italocegatta))

## [0.2.1-ALPHA](https://github.com/kakawait/hugo-tranquilpeak-theme/milestone/10) - 8 jan 2017

- 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))
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Please all the credit should be attributed to [original *Hexo* version](https://
## General

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

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

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

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

> *Hugo* version keeps every `.js` and `.css` files untouched from original *Hexo* version in order to enjoy futur original *Hexo* version updates or features!
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*).
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*).

## License

Expand Down
18 changes: 18 additions & 0 deletions archetypes/page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: "New Page"
categories:
- category
- subcategory
tags:
- tag1
- tag2
keywords:
- tech
comments: false
showDate: false
showSocial: false
showTags: false
showPagination: false
#thumbnailImage: //example.com/image.jpg
---

2 changes: 1 addition & 1 deletion archetypes/post.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ keywords:
#thumbnailImage: //example.com/image.jpg
---

<!-- more /-->
<!--more-->
2 changes: 1 addition & 1 deletion docs/developer.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ If you want to report a bug or ask a question, [create an issue](https://github.
## General ##

- **Author** : Thibaud Leprêtre
- **Version** : 0.2.1-ALPHA (based on Hexo version 1.9.1)
- **Version** : 0.2.2-ALPHA (based on Hexo version 1.9.1)
- **Compatibility** : Hugo v0.17

## Requirements ##
Expand Down
51 changes: 48 additions & 3 deletions docs/user.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@ If you want to report a bug or ask a question, [create an issue](https://github.
* [Tabbed code block](#tabbed-code-block)
* [Wide image](#wide-image)
* [Fancybox](#fancybox)
- [Writing pages](#writing-pages)
- [Running](#running)

## General

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

## Features
Expand Down Expand Up @@ -482,6 +483,7 @@ comments: false
showTags: true
showPagination: true
showSocial: true
showDate: true
```

|Variable|Description|
Expand All @@ -499,6 +501,7 @@ showSocial: true
|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`|
|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"`|
|comments|Disable the comment of the post.
|showDate|`true`: Show the date when `true` (default)|
|showTags|`true`: show tags of this page. Default behavior: `true`
|showPagination|`true`: show pagination. Default behavior: `true`
|showSocial|`true`: show social button such as share on Twitter, Facebook... Default behavior: `true`
Expand All @@ -517,11 +520,11 @@ The same with : `thumbnailImagePosition` set to `left`:

Use:

- `<!-- more -->` to define post excerpt and keep the post excerpt in the post content
- `<!--more-->` to define post excerpt and keep the post excerpt in the post content

### Display table of contents

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.
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.

Here is what looks like the table of contents generated:
![thumbnail-image-position-left](https://s3-ap-northeast-1.amazonaws.com/tranquilpeak-hexo-theme/docs/1.4.0/toc-400.png)
Expand Down Expand Up @@ -660,6 +663,48 @@ E.g:
|src|Path to the original image.|
|title (optional)|Title of image displayed in a caption under image. `Alt` HTML attribute will use this title. E.g : `"A beautiful sunrise"`.|
## Writing pages ##
Sometimes you need to create a **page** that is **not** a **regular blog post**,
where you want to hide the date, social sharing buttons, tags, categories
and pagination.
This is the case for the blog pages _About_ or _Contact_ for instance which do
not need to be timestamped (nor tagged or categorized) nor provide
pagination and are not intended to be shared on social networks.
In order to create such a page you can proceed like so:
```
hugo new page/contact.md
```
This creates the file `contact.md` in the directory `content/page`
pre-populated with the following front matter.
```yaml
---
title: "New Page"
categories:
- category
- subcategory
tags:
- tag1
- tag2
keywords:
- tech
comments: false
showDate: false
showSocial: false
showTags: false
showPagination: false
#thumbnailImage: //example.com/image.jpg
---

```
The rest is basically the same as for a regular _[post](#writing-posts)_.
## Running ##
Run `hugo server` and start writing! :)
2 changes: 1 addition & 1 deletion exampleSite/config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Tranquilpeak
# Version : 0.2.1-ALPHA
# Version : 0.2.2-ALPHA
# Author : Thibaud Leprêtre

# I STRONGLY recommend you to use a CDN to speed up loading of pages.
Expand Down
4 changes: 2 additions & 2 deletions exampleSite/content/post/Welcome-to-the-new-Tranquilpeak.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Welcome to Tranquilpeak 0.2.1"
title: "Welcome to Tranquilpeak 0.2.2"
date: 2015-06-15
categories:
- tranquilpeak
Expand Down Expand Up @@ -65,7 +65,7 @@ Please all the credit should be attributed to [original *Hexo* version](https://
## General

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

## Features
Expand Down
26 changes: 13 additions & 13 deletions i18n/pt-br.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
translation: "Categorias"

- id: "global.category"
translation: "Category"
translation: "Categoria"

- id: "global.tags"
translation: "Tags"
Expand Down Expand Up @@ -45,19 +45,19 @@
translation: "LinkedIn"

- id: "global.mail"
translation: "Mail"
translation: "Email"

- id: "global.rss"
translation: "RSS"

- id: "global.share_on_google_plus"
translation: "Partilhar no Google Plus"
translation: "Compartilhar no Google Plus"

- id: "global.share_on_facebook"
translation: "Partilhar no Facebook"
translation: "Compartilhar no Facebook"

- id: "global.share_on_twitter"
translation: "Partilhar no Twitter"
translation: "Compartilhar no Twitter"

- id: "global.search_category"
translation: "Pesquisar categoria"
Expand All @@ -73,30 +73,30 @@
translation: "não foram encontrados artigos"

- id: "global.post_found.one"
translation: "1 artigo encontrados"
translation: "1 artigo encontrado"

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

## GLOBAL.CATEGORIES_FOUND ##
- id: "global.categories_found.zero"
translation: "não foram encontrados categorias"
translation: "não foram encontradas categorias"

- id: "global.categories_found.one"
translation: "1 category encontrados"
translation: "1 categoria encontrada"

- id: "global.categories_found.other"
translation: "{n} categorias encontrados"
translation: "{n} categorias encontradas"

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

- id: "global.tags_found.one"
translation: "1 tag encontrados"
translation: "1 tag encontrada"

- id: "global.tags_found.other"
translation: "{n} tags encontrados"
translation: "{n} tags encontradas"

## PAGINATION ##
- id: "pagination.page"
Expand Down Expand Up @@ -128,7 +128,7 @@
translation: "ETIQUETADO em"

- id: "post.toc"
translation: "Tabela de Conteúdos"
translation: "Conteúdo"

- id: "post.read_more"
translation: "Continuar leitura"
Expand Down
13 changes: 10 additions & 3 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,15 @@
{{ else }}
{{ .Scratch.Set "sidebarBehavior" .Site.Params.sidebarBehavior }}
{{ end }}
<!-- Fix hugo 0.17 expects ".Site.Author.gravatarEmail" whereas hugo 0.18 expects ".Site.Author.gravataremail" -->
{{ if .Site.Author.gravatarEmail }}
{{ .Scratch.Set "gravatarEmail" .Site.Author.gravatarEmail }}
{{ end }}
{{ if .Site.Author.gravataremail }}
{{ .Scratch.Set "authorPicture" (printf "//www.gravatar.com/avatar/%s" (urlize (md5 .Site.Author.gravataremail))) }}
{{ .Scratch.Set "gravatarEmail" .Site.Author.gravataremail }}
{{ end }}
{{ if .Scratch.Get "gravatarEmail" }}
{{ .Scratch.Set "authorPicture" (printf "//www.gravatar.com/avatar/%s" (urlize (md5 (.Scratch.Get "gravatarEmail")))) }}
{{ else if .Site.Author.picture }}
{{ .Scratch.Set "authorPicture" (absURL .Site.Author.picture) }}
{{ end }}
Expand Down Expand Up @@ -54,8 +61,8 @@
{{ end }}
{{ end }}

{{ if .Site.Author.gravataremail }}
<meta property="og:image" content="//www.gravatar.com/avatar/{{ (md5 .Site.Author.gravataremail) | urlize }}?s=640">
{{ if .Scratch.Get "gravatarEmail" }}
<meta property="og:image" content="//www.gravatar.com/avatar/{{ (md5 (.Scratch.Get "gravatarEmail")) | urlize }}?s=640">
{{ else if .Site.Author.picture }}
<meta property="og:image" content="{{ .Site.Author.picture | absURL }}">
{{ end }}
Expand Down
8 changes: 5 additions & 3 deletions layouts/partials/post/meta.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<div class="postShorten-meta post-meta">
<time itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
{{ partial "internal/date.html" . }}
</time>
{{ if not (eq .Params.showDate false) }}
<time itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
{{ partial "internal/date.html" . }}
</time>
{{ end }}
{{ partial "post/category.html" . }}
</div>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hugo-tranquilpeak-theme",
"version": "0.2.1-ALPHA",
"version": "0.2.2-ALPHA",
"description": "A gorgeous responsive theme for Hugo blog framework",
"main": "Gruntfile.js",
"scripts": {
Expand Down

0 comments on commit 233b46a

Please sign in to comment.