diff options
author | Thibaud Lepretre <thibaud.lepretre@gmail.com> | 2017-03-31 15:18:30 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-31 15:18:29 +0300 |
commit | 3b094f14b492299c8323178e8990fb90e5b78832 (patch) | |
tree | 0f7d1bb09b5ed3307fa5895e65f0f798f8a2b0d2 | |
parent | 233b46aea2d015a448de6f1ae8d9c477a12caec1 (diff) | |
parent | cd9f2aefb80bee8008576b52a54b79e422c9a47e (diff) |
Merge pull request #131 from kakawait/develop0.2.3-ALPHA
Releasing 0.2.3-ALPHA
-rw-r--r-- | CHANGELOG.md | 23 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | docs/developer.md | 2 | ||||
-rw-r--r-- | docs/user.md | 10 | ||||
-rw-r--r-- | exampleSite/config.toml | 13 | ||||
-rw-r--r-- | exampleSite/content/post/Welcome-to-the-new-Tranquilpeak.md | 4 | ||||
-rw-r--r-- | layouts/partials/head.html | 7 | ||||
-rw-r--r-- | layouts/partials/post/actions.html | 8 | ||||
-rw-r--r-- | layouts/partials/script.html | 6 | ||||
-rw-r--r-- | package.json | 2 |
10 files changed, 60 insertions, 17 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e9de19..2acf561 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,29 @@ All notable changes to this project will be documented in this file. +## [0.2.3-ALPHA](https://github.com/kakawait/hugo-tranquilpeak-theme/milestone/12) - 31 mar 2017 + +- CSS and JS imports customization ([#120](https://github.com/kakawait/hugo-tranquilpeak-theme/pull/120)) (thank you [#yamila-moreno](https://github.com/yamila-moreno)) + +two news settings: + +```toml +customCSS = ["css/foo.css"] +customJS = ["js/foo.js"] +``` + +That allow you to inject your own `CSS` or `JS` + +- Fix nav since Hugo 0.18 ([#119](https://github.com/kakawait/hugo-tranquilpeak-theme/issues/119), [#122](https://github.com/kakawait/hugo-tranquilpeak-theme/pull/122)) +- Change _Next_ and _Previous_ behavior ([#118](https://github.com/kakawait/hugo-tranquilpeak-theme/issues/118), [#122](https://github.com/kakawait/hugo-tranquilpeak-theme/pull/122)) + +### Breaking changes + +Related to new _Next_ and _Previous_ behavior [#118](https://github.com/kakawait/hugo-tranquilpeak-theme/issues/118), nav is now working like following + +Next -> Newer post +Previous -> Older post + ## [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)) @@ -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.2-ALPHA (based on Hexo version 1.9.1) +- **Version**: 0.2.3-ALPHA (based on Hexo version 1.9.1) - **Compatibility**: Hugo v0.17 ## Features diff --git a/docs/developer.md b/docs/developer.md index baa61c1..6524d33 100644 --- a/docs/developer.md +++ b/docs/developer.md @@ -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.2-ALPHA (based on Hexo version 1.9.1) +- **Version** : 0.2.3-ALPHA (based on Hexo version 1.9.1) - **Compatibility** : Hugo v0.17 ## Requirements ## diff --git a/docs/user.md b/docs/user.md index 657f50d..7453bdc 100644 --- a/docs/user.md +++ b/docs/user.md @@ -53,7 +53,7 @@ If you want to report a bug or ask a question, [create an issue](https://github. ## General - **Authors**: [Louis Barranqueiro (LouisBarranqueiro)](https://github.com/LouisBarranqueiro) and [Thibaud Leprêtre (kakawait)](https://github.com/kakawait) -- **Version**: 0.2.2-ALPHA (based on Hexo version 1.9.1) +- **Version**: 0.2.3-ALPHA (based on Hexo version 1.9.1) - **Compatibility**: Hugo v0.17 ## Features @@ -344,7 +344,7 @@ E.g to display a shortcut to open algolia search window : thumbnailImagePosition = "right" autoThumbnailImage = true coverImage = "cover.jpg" - favicon = + favicon = /favicon.png imageGallery = true hierarchicalCategories = true ``` @@ -354,12 +354,14 @@ E.g to display a shortcut to open algolia search window : | sidebarBehavior | Define the behavior of the header and sidebar :<ul><li>1: Display extra large sidebar on extra large screen, large sidebar on large screen, medium sidebar on medium screen and header bar on small screen and extra large sidebar is swiped on extra large screen and large sidebar on all lower screens when open button is clicked (default)</li><li>2: Display large sidebar on extra large & large screen, medium sidebar on medium screen and header bar on small screen and large sidebar is swiped when open button is clicked</li><li>3: Display medium sidebar on large and medium screen and header bar on small screen and medium sidebar is swiped when open button is clicked</li><li>4: Display header bar on all screens, extra large sidebar is swiped on extra large screen and large sidebar is swiped on all lower screens</li><li>5: Display header bar on all screens and large sidebar is swiped on large screen</li><li>6: isplay header bar on all screens and medium sidebar is swiped</li></ul> | | clearReading | Hide sidebar on all article page to let article take full width to improve reading, and enjoy wide images and cover images. Useless if `sidebarBehavior` is equal to `3` or `4`. (true: enable, false: disable). Default behavior : `params.clearReading` value in theme configuration file. | | thumbnailImage | Display thumbnail image of each post on index pages | -| thumbnailImagePosition | Display thumbnail image at the right of title in index pages (`right`, `left` or `bottom`). Set this value to `right` if you have old posts to keep the old style on them and define `thumbnailImagePosition` on a post to overwrite this setting. (Default : `right`) | +| thumbnailImagePosition | Display thumbnail image at the right of title in index pages (`right`, `left` or `bottom`). Set this value to `right` if you have old posts to keep the old style on them and define `thumbnailImagePosition` on a post to overwrite this setting. (Default: `right`) | | autoThumbnailImage | Automatically select the cover image or the first photo from the gallery of a post if there is no thumbnail image as the thumbnail image. Set this value to `true` if you have old posts that use the cover image or the first photo as the thumbnail image and set `autoThumbnailImage` to `false` on a post to overwrite this setting. (Default : `true`) | | coverImage | Your blog cover picture. **I STRONGLY recommend you to use a CDN to speed up loading of pages. There is many free CDN like Cloudinary or you can also use indirectly by using services like Google Photos.** | -| favicon | Your favicon path | +| favicon | Your favicon path (Default: `/favicon.png`) | | imageGallery | Display an image gallery at the end of a post which have `photos` variables. (false: disabled, true: enabled) | | hierarchicalCategories | Define categories will create hierarchy between parents: `categories = ["foo", "bar"]` will consider "bar" a sub-category of "foo". If false it will flat categories. | +| customCSS | Define files with css that override or extend the theme css; they are expected in `static` folder: `customCSS` = ["css/mystyles.css"]. | +| customJS | Define files with js that override or extend the theme js; they are expected in `static` folder: `customJS` = ["js/myscripts.js"]. | E.g : A category page look like this with `hierarchicalCategories = true` : diff --git a/exampleSite/config.toml b/exampleSite/config.toml index ab44bf5..082cc6f 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -1,5 +1,5 @@ # Tranquilpeak -# Version : 0.2.2-ALPHA +# Version : 0.2.3-ALPHA # Author : Thibaud Leprêtre # I STRONGLY recommend you to use a CDN to speed up loading of pages. @@ -153,6 +153,9 @@ canonifyurls = true # and set `autoThumbnailImage` to `false` on a post to overwrite this setting autoThumbnailImage = true + # Your favicon path, default is "/favicon.png" + # favicon = "/favicon.png" + # Header configuration # The link at the right of the header is customizable # You can add a link (as an icon) at the right of the header instead of the author's gravatar image or author's picture. @@ -172,3 +175,11 @@ canonifyurls = true # Customize copyright value "© 2016 <CUSTOMIZATION>. All Rights Reserved" # [params.footer] # copyright = "<a href=\"https://github.com/kakawait\">kakawait</a>" + # + # Custom CSS. Put here your custom CSS files. They are loaded after the theme CSS; + # they have to be referred from static root. Example + # customCSS = ["css/foo.css"] + + # Custom JS. Put here your custom JS files. They are loaded after the theme JS; + # they have to be referred from static root. Example + # customJS = ["js/foo.js"] diff --git a/exampleSite/content/post/Welcome-to-the-new-Tranquilpeak.md b/exampleSite/content/post/Welcome-to-the-new-Tranquilpeak.md index 7aa38e9..cff7369 100644 --- a/exampleSite/content/post/Welcome-to-the-new-Tranquilpeak.md +++ b/exampleSite/content/post/Welcome-to-the-new-Tranquilpeak.md @@ -1,5 +1,5 @@ --- -title: "Welcome to Tranquilpeak 0.2.2" +title: "Welcome to Tranquilpeak 0.2.3-ALPHA" date: 2015-06-15 categories: - tranquilpeak @@ -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.2-ALPHA (based on Hexo version 1.9.1) +- **Version**: 0.2.3-ALPHA (based on Hexo version 1.9.1) - **Compatibility**: Hugo v0.17 ## Features diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 6e95748..e9c705b 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -32,7 +32,7 @@ <meta name="author" content="{{ .Site.Author.name }}"> <meta name="keywords" content="{{ with .Keywords }}{{ delimit . ", " }}{{ end }}{{ if .Site.Params.keywords }}, {{ delimit .Site.Params.keywords ", " }}{{ end }}"> - <link rel="icon" href="/favicon.png"> + <link rel="icon" href="{{ with .Site.Params.favicon }}{{ . }}{{ else }}/favicon.png{{ end }}"> {{ with .RSSLink }} <link rel="alternate" type="application/rss+xml" title="RSS" href="{{ . }}"> {{ end }} @@ -90,8 +90,11 @@ <!--EXTERNAL STYLES END--> <!--STYLES--> <link rel="stylesheet" href="/css/style-gwlo24d2hxipxk8bi1sxik0zhlpn9t7ebcmgp9kubmmcjfzlavuyhvbqumhn.min.css" /> + {{ range .Site.Params.customCSS }} + <link rel="stylesheet" href="{{ $.Site.BaseURL }}{{ . }}"> + {{ end }} <!--STYLES END--> - + {{ if .Params.ga.async }} {{ template "_internal/google_analytics_async.html" . }} {{ else }} diff --git a/layouts/partials/post/actions.html b/layouts/partials/post/actions.html index c05c753..3fe1b59 100644 --- a/layouts/partials/post/actions.html +++ b/layouts/partials/post/actions.html @@ -3,22 +3,22 @@ <ul class="post-actions post-action-nav"> {{ if (not (eq .Params.showPagination false)) }} <li class="post-action"> - {{ with .Prev }} + {{ with .NextInSection }} <a class="post-action-btn btn btn--default tooltip--top" href="{{ .RelPermalink }}" data-tooltip="{{ .Title }}"> {{ else }} <a class="post-action-btn btn btn--disabled"> {{ end }} <i class="fa fa-angle-left"></i> - <span class="hide-xs hide-sm text-small icon-ml">{{ i18n "pagination.previous" }}</span> + <span class="hide-xs hide-sm text-small icon-ml">{{ i18n "pagination.next" }}</span> </a> </li> <li class="post-action"> - {{ with .Next }} + {{ with .PrevInSection }} <a class="post-action-btn btn btn--default tooltip--top" href="{{ .RelPermalink }}" data-tooltip="{{ .Title }}"> {{ else }} <a class="post-action-btn btn btn--disabled"> {{ end }} - <span class="hide-xs hide-sm text-small icon-mr">{{ i18n "pagination.next" }}</span> + <span class="hide-xs hide-sm text-small icon-mr">{{ i18n "pagination.previous" }}</span> <i class="fa fa-angle-right"></i> </a> </li> diff --git a/layouts/partials/script.html b/layouts/partials/script.html index 09bdddc..e00a5d7 100644 --- a/layouts/partials/script.html +++ b/layouts/partials/script.html @@ -63,4 +63,8 @@ $(document).ready(function() { var algoliaIndex = algoliaClient.initIndex('{{ .indexName }}'); </script> {{ end }} -{{ end }}
\ No newline at end of file +{{ end }} + +{{ range .Site.Params.customJS }} + <script src="{{ $.Site.BaseURL }}{{ . }}"></script> +{{ end }} diff --git a/package.json b/package.json index fa40887..eff24e4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hugo-tranquilpeak-theme", - "version": "0.2.2-ALPHA", + "version": "0.2.3-ALPHA", "description": "A gorgeous responsive theme for Hugo blog framework", "main": "Gruntfile.js", "scripts": { |