Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kakawait/hugo-tranquilpeak-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'docs/user.md')
-rw-r--r--docs/user.md169
1 files changed, 113 insertions, 56 deletions
diff --git a/docs/user.md b/docs/user.md
index 9b8634d..ef5e7a3 100644
--- a/docs/user.md
+++ b/docs/user.md
@@ -14,47 +14,53 @@ If you want to report a bug or ask a question, [create an issue](https://github.
- [General](#general)
- [Features](#features)
- * [Missing features from original *Hexo* version](#missing-features-from-original-hexo-version)
+ - [Missing features from original *Hexo* version](#missing-features-from-original-hexo-version)
- [Requirements](#requirements)
- [Installation](#installation)
- [Tranquilpeak configuration](#tranquilpeak-configuration)
- - [Language configuration](#language-configuration)
- * [Menu translation](#menu-translation)
- - [Theme configuration](#theme-configuration)
- * [Define date format](#define-date-format)
- * [Define global keywords](#define-global-keywords)
- * [Sidebar](#sidebar)
- * [Header](#header)
- * [Author](#author)
- * [Customization](#customization)
- * [Integrated services](#integrated-services)
- * [Sharing options](#sharing-options)
- * [Enable pages](#enable-pages)
+ - [Language configuration](#language-configuration)
+ - [Menu translation](#menu-translation)
+ - [Setting up default theme to Tranquilpeak](#setting-up-default-theme-to-tranquilpeak)
+ - [Define date format](#define-date-format)
+ - [Define global keywords](#define-global-keywords)
+ - [Theme configuration](#theme-configuration)
+ - [Sidebar](#sidebar)
+ - [Header](#header)
+ - [Author](#author)
+ - [Customization](#customization)
+ - [Add custom JS or CSS using configuration](#add-custom-js-or-css-using-configuration)
+ - [Integrated services](#integrated-services)
+ - [Disqus](#disqus)
+ - [Gitalk](#gitalk)
+ - [Google Analytics](#google-analytics)
+ - [Gravatar](#gravatar)
+ - [Facebook](#facebook)
+ - [Sharing options](#sharing-options)
+ - [Enable pages](#enable-pages)
- [Integrated services configuration](#integrated-services-configuration)
- * [Google Analytics](#google-analytics)
- * [Exclude hostname (localhost) while writing articles](#exclude-hostname-localhost-while-writing-articles)
- * [Social cards](#social-cards)
+ - [Google Analytics](#google-analytics-1)
+ - [Exclude hostname (localhost) while writing articles](#exclude-hostname-localhost-while-writing-articles)
+ - [Social cards](#social-cards)
- [Quick & easy modifications](#quick--easy-modifications)
- * [Prerequisites](#prerequisites)
- * [Change global style](#change-global-style)
- * [Change code coloration (Highlight.js theme)](#change-code-coloration-highlightjs-theme)
+ - [Prerequisites](#prerequisites)
+ - [Change global style](#change-global-style)
+ - [Change code coloration (Highlight.js theme)](#change-code-coloration-highlightjs-theme)
- [Writing posts](#writing-posts)
- * [Front-matter settings](#front-matter-settings)
- * [Define post excerpt](#define-post-excerpt)
- * [Display table of contents](#display-table-of-contents)
- * [Tags](#tags)
- * [Alert](#alert)
- * [Highlight text](#highlight-text)
- * [Image](#image)
- * [Tabbed code block](#tabbed-code-block)
- * [Wide image](#wide-image)
- * [Fancybox](#fancybox)
+ - [Front-matter settings](#front-matter-settings)
+ - [Define post excerpt](#define-post-excerpt)
+ - [Display table of contents](#display-table-of-contents)
+ - [Tags](#tags)
+ - [Alert](#alert)
+ - [Highlight Text](#highlight-text)
+ - [Image](#image)
+ - [Tabbed code block](#tabbed-code-block)
+ - [Wide image](#wide-image)
- [Writing pages](#writing-pages)
- [Running](#running)
## General
-- **Authors**: [Louis Barranqueiro (LouisBarranqueiro)](https://github.com/LouisBarranqueiro) and [Thibaud LeprĂȘtre (kakawait)](https://github.com/kakawait)
+- **Authors**: [Thibaud LeprĂȘtre (kakawait)](https://github.com/kakawait) and [Louis Barranqueiro (LouisBarranqueiro)](https://github.com/LouisBarranqueiro)
- **Version**: 0.5.0-SNAPSHOT (based on Hexo version 3.1.0)
- **Compatibility**: Hugo v0.53
@@ -87,13 +93,13 @@ If you want to report a bug or ask a question, [create an issue](https://github.
**Integrated services:**
- Disqus
+- Gitalk
- Google analytics
- Gravatar
- Facebook Insights
### Missing features from original *Hexo* version
-- [ ] 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)
@@ -139,8 +145,10 @@ by one of the following code (code is between `()`):
- Japanase (`ja`)
- Portuguese (`pt-br`)
- Russian (`ru`)
-- Spanish (`es`)
+- Spanish (`es-es`)
- Vietnamese (`vi`)
+- Dutch (`nl-nl`)
+- Swedish (`sv-se`)
If your language is not available, follow this guidelines (E.g : add swedish language (`sv-se`)) :
@@ -216,41 +224,34 @@ You can add groups of links and links much as you want.
```toml
[[menu.main]]
- weight = 0
+ weight = 1
identifier = "home"
name = "Home"
- pre = "<i class=\"sidebar-button-icon fa fa-lg fa-home\" aria-hidden=\"true\"></i>"
+ pre = "<i class=\"sidebar-button-icon fas fa-lg fa-home\" aria-hidden=\"true\"></i>"
url = "/"
[[menu.main]]
- weight = 1
+ weight = 2
identifier = "categories"
name = "Categories"
- pre = "<i class=\"sidebar-button-icon fa fa-lg fa-bookmark\" aria-hidden=\"true\"></i>"
+ pre = "<i class=\"sidebar-button-icon fas fa-lg fa-bookmark\" aria-hidden=\"true\"></i>"
url = "/categories"
[[menu.main]]
- weight = 2
+ weight = 3
identifier = "tags"
name = "Tags"
- pre = "<i class=\"sidebar-button-icon fa fa-lg fa-tags\" aria-hidden=\"true\"></i>"
+ pre = "<i class=\"sidebar-button-icon fas fa-lg fa-tags\" aria-hidden=\"true\"></i>"
url = "/tags"
[[menu.main]]
- weight = 3
+ weight = 4
identifier = "archives"
name = "Archives"
- pre = "<i class=\"sidebar-button-icon fa fa-lg fa-archive\" aria-hidden=\"true\"></i>"
+ pre = "<i class=\"sidebar-button-icon fas fa-lg fa-archive\" aria-hidden=\"true\"></i>"
url = "/archives"
[[menu.main]]
- weight = 4
- identifier = "search"
- name = "Search"
- pre = "<i class=\"sidebar-button-icon fa fa-lg fa-search\" aria-hidden=\"true\"></i>"
- url = "/#search"
- class = "st-search-show-outputs"
-[[menu.main]]
- weight = 4
+ weight = 5
identifier = "about"
name = "About"
- pre = "<i class=\"sidebar-button-icon fa fa-lg fa-question\" aria-hidden=\"true\"></i>"
+ pre = "<i class=\"sidebar-button-icon fas fa-lg fa-question\" aria-hidden=\"true\"></i>"
url = "/#about"
[[menu.links]]
@@ -270,7 +271,7 @@ You can add groups of links and links much as you want.
weight = 0
identifier = "rss"
name = "RSS"
- pre = "<i class=\"sidebar-button-icon fa fa-lg fa-rss\" aria-hidden=\"true\"></i>"
+ pre = "<i class=\"sidebar-button-icon fas fa-lg fa-rss\" aria-hidden=\"true\"></i>"
url = "/index.xml"
```
@@ -406,16 +407,74 @@ Futhermore, even if previous syntax is still supported (`customJS = ["js/myscrip
#### Integrated services
+For privacy settings please refer to https://gohugo.io/about/hugo-and-gdpr/
+
+##### Disqus
+
```toml
disqusShortname =
+[params.comment.disqus]
+ enable = true
+```
+
+| Variable | Description |
+|----------|-------------|
+| disqusShortname | Your Disqus shortname |
+| enable | Toggle disqus globally |
+
+##### Gitalk
+
+```toml
+[params.comment.gitalk]
+ enable = true
+ # clientId =
+ # clientSecret =
+ # owner =
+ # repo =
+ # See all options: https://github.com/gitalk/gitalk#options
+ [params.comment.gitalk.options]
+ language = "en"
+ perPage = 10
+ distractionFreeMode = false
+ enableHotKey = true
+ pagerDirection = "first"
+```
+
+| Variable | Description |
+|----------|-------------|
+| enable | Toggle gitalk globally |
+| clientId | GitHub Application Client ID |
+| clientSecret | GitHub Application Client Secret |
+| owner | GitHub repository owner. Can be personal user or organization |
+| repo | GitHub repository |
+| _options_ | See all available options on https://github.com/gitalk/gitalk#options |
+
+##### Google Analytics
+
+```toml
googleAnalytics =
+[params.googleAnalytics]
+ async = true
```
+| Variable | Description |
+|----------|-------------|
+| googleAnalytics | Your Google analystics web property ID : UA-XXXXX-X |
+| async | Load Google analytics asynchronously |
+
+##### Gravatar
+
```toml
[author]
gravatarEmail =
```
+| Variable | Description |
+|----------|-------------|
+| gravatarEmail | Your gravatar email. Overwrite `author.picture` everywhere in the blog |
+
+##### Facebook
+
```toml
[params]
fbAdminIds =
@@ -423,10 +482,7 @@ googleAnalytics =
```
| Variable | Description |
-|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| disqusShortname | Your Disqus shortname. |
-| gravatarEmail | Your gravatar email. Overwrite `author.picture` everywhere in the blog |
-| googleAnalytics | Your Google analystics web property ID : UA-XXXXX-X |
+|----------|-------------|
| fbAdminIds | Your Facebook user ids used to connect your blog with your facebook user accounts (Facebook Insights). Use array syntax. E.g : `[9830047, 1003342]`. Visit [Facebook docs](https://developers.facebook.com/docs/platforminsights/domains) for more information. |
| fbAppId | Your Facebook app id used to connect your blog with your facebook app account (Facebook Insights). E.g : `9841307`. Visit [Facebook docs](https://developers.facebook.com/docs/platforminsights/domains) for more information. |
@@ -456,7 +512,7 @@ You can comment and uncomment to enable or disable sharing options. If your own
[params]
[[params.sharingOptions]]
name = "Foo bar"
- icon = "fa-foo-bar"
+ icon = "fas fa-foo-bar"
url = "https://www.foo-bar.com/sharer/sharer.php?u=%s"
```
@@ -512,7 +568,7 @@ You can configure how links to your site will appear in Twitter and/or Facebook.
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)
-**Run command in theme folder : `hexo-blog/themes/tranquilpeak`**
+**Run command in theme folder : `hugo-blog/themes/tranquilpeak`**
### Change global style
@@ -592,6 +648,7 @@ summary: "This is a custom summary and does *not* appear in the post."
|showMeta|`true`: Show post meta (date, categories).|
|showActions|`true`: Show post actions (navigation, share links).|
|summary|Custom excerpt text to show on the homepage.|
+|link|Override default URL/link for a given article/page.|
Example:
A post on index page will look like this with :`thumbnailImagePosition` set to `bottom`: