From ca807c2ad6757b356e0ca11040b3bba7a9d597c3 Mon Sep 17 00:00:00 2001 From: panr Date: Fri, 22 Feb 2019 10:06:03 +0100 Subject: [PATCH 1/7] Small fixes to reading time feature --- README.md | 2 +- exampleSite/config.toml | 4 ++++ layouts/_default/list.html | 2 +- layouts/_default/single.html | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2ad22c5..21bcba8 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ paginate = 5 defaultTheme = "dark" # if you set this to 0, only submenu trigger will be visible showMenuItems = 2 - # Enable to show reading time in minutes for posts + # Show reading time in minutes for posts showReadingTime = false [languages] diff --git a/exampleSite/config.toml b/exampleSite/config.toml index e315abf..2d49a62 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -8,7 +8,10 @@ paginate = 5 contentTypeName = "post" # "light" or "dark" defaultTheme = "dark" + # if you set this to 0, only submenu trigger will be visible showMenuItems = 2 + # Enable to show reading time in minutes for posts + showReadingTime = false [languages] [languages.en] @@ -22,6 +25,7 @@ paginate = 5 readOtherPosts = "Read other posts" newerPosts = "Newer posts" olderPosts = "Older posts" + minuteReadingTime = "min read" [languages.en.params.logo] logoText = "hello friend" diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 6da2c7e..93eb8fc 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -13,7 +13,7 @@ {{ with .Params.Author }}— {{ $.Site.Params.WrittenBy | default "Written by" }} {{ . }}{{ end }} {{ if $.Site.Params.ShowReadingTime }} - — ⏰ {{ .ReadingTime }} {{ $.Site.Params.MinuteReadingTime | default "min read" }} + — {{ .ReadingTime }} {{ $.Site.Params.MinuteReadingTime | default "min read" }} {{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index b30f221..0a2a768 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -9,7 +9,7 @@ {{ end }} {{ with .Params.Author }}— {{ $.Site.Params.WrittenBy | default "Written by" }} {{ . }}{{ end }} {{ if $.Site.Params.ShowReadingTime }} - — ⏰ {{ .ReadingTime }} {{ $.Site.Params.MinuteReadingTime | default "min read" }} + — {{ .ReadingTime }} {{ $.Site.Params.MinuteReadingTime | default "min read" }} {{ end }} From f7e16f680f2154f97c207ea2535a2aab533aecbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radek=20Kozie=C5=82?= Date: Tue, 26 Feb 2019 00:21:30 +0100 Subject: [PATCH 2/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 21bcba8..40de0e8 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,7 @@ and go to `localhost:1313` in your browser. From now on all the changes you make ## How to edit the theme -If you have to override some of the styles, you can do this easily by adding `static/styles.css` in your root directory and point things you want to change. +If you have to override some of the styles, you can do this easily by adding `static/style.css` in your root directory and point things you want to change. Otherwise, if you really want to edit the theme, you need to install Node dependencies. To do so, go to the theme directory (from your Hugo root directory): From be730d5c281e94e9ca4eec21b40db540265c73ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radek=20Kozie=C5=82?= Date: Wed, 6 Mar 2019 01:16:57 +0100 Subject: [PATCH 3/7] Update README.md --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 40de0e8..8a11d6d 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,20 @@ This theme is pretty basic and covers all of the essentials. All you have to do ### DEMO - https://hugo-hello-friend.now.sh/ +--- + +- [Features](#features) +- [Built-in shortcodes](#built-in-shortcodes) +- [Code highlighting](#code-highlighting) +- [How to start](#how-to-start) +- [How to configure](#how-to-configure) +- [Add-ons](#add-ons) +- [How to run your site](#how-to-run-your-site) +- [How to edit the theme](#how-to-edit-the-theme) +- [How to contribute](#how-to-contribute) +- [Terminal theme user?](#terminal-theme-user) +- [Licence](#licence) + ## Features - **dark/light mode**, depending on your preferences (dark is default, but you can change it) @@ -107,6 +121,10 @@ to `config.toml` file in your Hugo root directory and change params fields. In c **NOTE:** Please keep in mind that currently main menu doesn't support nesting. +## Add-ons + +- **Comments** — for adding comments to your blog posts please take a look at `layouts/partials/comments.html` https://github.com/panr/hugo-theme-terminal/blob/master/layouts/partials/comments.html. + ## How to run your site From your Hugo root directory run: @@ -139,6 +157,10 @@ $ yarn If you spot any bugs, please use [Issue Tracker](https://github.com/panr/hugo-theme-hello-friend/issues) or if you want to add a new feature directly please create a new [Pull Request](https://github.com/panr/hugo-theme-hello-friend/pulls). +## `Hello friend` theme user? + +I'd be happy to know more about you and what you are doing. If you want to share it, please make a contribution and [add your site to the list](https://github.com/panr/hugo-theme-hello-friend/blob/master/USERS.md)! 🤗 + ## Licence Copyright © 2019 Radosław Kozieł ([@panr](https://twitter.com/panr)) From 740dfa22abb4f68a6125cccf6a5d473abb71158a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radek=20Kozie=C5=82?= Date: Wed, 6 Mar 2019 01:17:22 +0100 Subject: [PATCH 4/7] Create USERS.md --- USERS.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 USERS.md diff --git a/USERS.md b/USERS.md new file mode 100644 index 0000000..7896b8f --- /dev/null +++ b/USERS.md @@ -0,0 +1,8 @@ +# Meet the users of Hello Friend theme! + + From d7b27c55c268377acdae2aecf95f4b67d5fabc12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radek=20Kozie=C5=82?= Date: Wed, 6 Mar 2019 01:18:18 +0100 Subject: [PATCH 5/7] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8a11d6d..ca131c9 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ This theme is pretty basic and covers all of the essentials. All you have to do - [How to run your site](#how-to-run-your-site) - [How to edit the theme](#how-to-edit-the-theme) - [How to contribute](#how-to-contribute) -- [Terminal theme user?](#terminal-theme-user) +- [Hello Friend theme user?](#hello-friend-theme-user) - [Licence](#licence) ## Features @@ -157,7 +157,7 @@ $ yarn If you spot any bugs, please use [Issue Tracker](https://github.com/panr/hugo-theme-hello-friend/issues) or if you want to add a new feature directly please create a new [Pull Request](https://github.com/panr/hugo-theme-hello-friend/pulls). -## `Hello friend` theme user? +## `Hello Friend` theme user? I'd be happy to know more about you and what you are doing. If you want to share it, please make a contribution and [add your site to the list](https://github.com/panr/hugo-theme-hello-friend/blob/master/USERS.md)! 🤗 From ab1714b799cca72df0f2a2e12164cdd18eb3ae54 Mon Sep 17 00:00:00 2001 From: DaMoo Date: Thu, 7 Mar 2019 14:31:02 -0500 Subject: [PATCH 6/7] Add configuration option to change date format --- README.md | 2 ++ exampleSite/config.toml | 2 ++ layouts/_default/list.html | 2 +- layouts/_default/single.html | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ca131c9..1f542d8 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,8 @@ paginate = 5 newerPosts = "Newer posts" olderPosts = "Older posts" minuteReadingTime = "min read" + dateFormatSingle = "2006-01-02" + dateFormatList = "2006-01-02" [languages.en.params.logo] logoText = "hello friend" diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 2d49a62..9ec00e9 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -26,6 +26,8 @@ paginate = 5 newerPosts = "Newer posts" olderPosts = "Older posts" minuteReadingTime = "min read" + dateFormatSingle = "2006-01-02" + dateFormatList = "2006-01-02" [languages.en.params.logo] logoText = "hello friend" diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 93eb8fc..eda29eb 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -9,7 +9,7 @@

{{ .Title | markdownify }}