diff options
author | Thibaud Lepretre <thibaud.lepretre@gmail.com> | 2021-07-31 01:00:51 +0300 |
---|---|---|
committer | Thibaud Lepretre <thibaud.lepretre@gmail.com> | 2021-08-11 15:03:20 +0300 |
commit | d5d15554b9820d6933eb1966504d48c026f4cbb4 (patch) | |
tree | f8310653f692878708fa4e46085ae8d879628482 | |
parent | f35170151c6619d11a7d5b47e7a0af7fadf56345 (diff) |
Update doc
-rw-r--r-- | .github/CONTRIBUTING.md | 8 | ||||
-rw-r--r-- | README.md | 11 | ||||
-rw-r--r-- | docs/developer.md | 20 | ||||
-rw-r--r-- | docs/user.md | 169 | ||||
-rw-r--r-- | exampleSite/config.toml | 12 | ||||
-rw-r--r-- | exampleSite/content/posts/Welcome-to-the-new-Tranquilpeak.md | 4 |
6 files changed, 141 insertions, 83 deletions
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 19a6fe3..8043181 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,8 +1,8 @@ -# Contributing # +# Contributing All kinds of contributions (enhancements, new features, documentation & code improvements, issues & bugs reporting) are welcome. -## Code style ## +## Code style ### Javascript @@ -13,11 +13,11 @@ Check code status with: npm run lint ``` -## Issues ## +## Issues 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. -## Pull requests ## +## Pull requests All pull requests must be done on the **develop** branch. @@ -35,7 +35,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) +- **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 @@ -68,13 +68,13 @@ Please all the credit should be attributed to [original *Hexo* version](https:// **Integrated services:** - Disqus +- Gitlak - Google analytics - Gravatar - Facebook Insights ### Missing features from original *Hexo* version -- [ ] Baidu analytics - [ ] Algolia (https://github.com/kakawait/hugo-tranquilpeak-theme/issues/8) - [ ] Pagination customization `tagPagination`, `categoryPagination` and `archivePagination` (https://github.com/kakawait/hugo-tranquilpeak-theme/issues/17) @@ -140,15 +140,10 @@ To understand the code, the workflow and edit the theme, consult the following d ## Contributing -All kinds of contributions (enhancements, new features, documentation & code improvements, issues & bugs reporting) are welcome. +All kinds of contributions (enhancements, features, documentation & code improvements, bugs reporting) are welcome. Read [guidelines for contributing](https://github.com/kakawait/hugo-tranquilpeak-theme/blob/master/.github/CONTRIBUTING.md) for more information. -As explained on [Credits](#credits): - -> *Hugo* version keeps every `.js` and `.css` files untouched from original *Hexo* version in order to enjoy future original *Hexo* version updates or features! - -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 diff --git a/docs/developer.md b/docs/developer.md index 3ed189e..f041d5b 100644 --- a/docs/developer.md +++ b/docs/developer.md @@ -11,18 +11,20 @@ If you want to report a bug or ask a question, [create an issue](https://github. - [Installation](#installation) - [Code style](#code-style) - [Code structure](#code-structure) - * [Views](#views) - * [Assets](#assets) - * [Stylesheets](#stylesheets) - * [Images](#images) - * [Javascript](#javascript) +- [Views](#views) +- [Assets](#assets) + - [Stylesheets](#stylesheets) + - [Images](#images) + - [Javascript](#javascript) - [NPM scripts](#npm-scripts) - [Grunt tasks](#grunt-tasks) - * [Tasks structure](#tasks-structure) - * [Pipeline](#pipeline) - * [Config tasks](#config-tasks) - * [Register tasks](#register-tasks) +- [Tasks structure](#tasks-structure) +- [Pipeline](#pipeline) +- [Config tasks](#config-tasks) +- [Register tasks](#register-tasks) - [Build](#build) +- [Development environment](#development-environment) +- [Production environment (before deploying your blog)](#production-environment-before-deploying-your-blog) - [Running](#running) ## General ## 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`: diff --git a/exampleSite/config.toml b/exampleSite/config.toml index adec42a..16d56e0 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -55,31 +55,31 @@ canonifyurls = true 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 = 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 = 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 = 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 = 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]] @@ -99,7 +99,7 @@ canonifyurls = true weight = 1 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" # ------------- diff --git a/exampleSite/content/posts/Welcome-to-the-new-Tranquilpeak.md b/exampleSite/content/posts/Welcome-to-the-new-Tranquilpeak.md index b1e9b04..48dfe89 100644 --- a/exampleSite/content/posts/Welcome-to-the-new-Tranquilpeak.md +++ b/exampleSite/content/posts/Welcome-to-the-new-Tranquilpeak.md @@ -64,7 +64,11 @@ Please all the credit should be attributed to [original *Hexo* version](https:// ## General +<<<<<<< HEAD - **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) +>>>>>>> b1e13c4 (Update doc) - **Version**: 0.5.0-SNAPSHOT (based on Hexo version 3.1.0) - **Compatibility**: Hugo v0.53 |