-
+
{{ partial "partials/header/basic.html" . }}
From caa8476e3584f40e0271188a053af9c4da8164ba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?=
Date: Sun, 1 Jan 2023 21:32:56 +0000
Subject: [PATCH 11/12] :bug: fix for sharing links parameter in params.toml
config file
---
config/_default/params.toml | 2 +-
data/sharing.json | 62 ++++++++++++-------------
exampleSite/config/_default/params.toml | 2 +-
layouts/partials/sharing-links.html | 23 ++++-----
4 files changed, 44 insertions(+), 45 deletions(-)
diff --git a/config/_default/params.toml b/config/_default/params.toml
index c5d2631c..e36329e2 100644
--- a/config/_default/params.toml
+++ b/config/_default/params.toml
@@ -65,7 +65,7 @@ enableCodeCopy = true
showAuthorsBadges = false
showWordCount = true
showSummary = true
- sharingLinks = [ "linkedin", "twitter", "whatsapp", "pinterest", "reddit", "facebook", "email"]
+ sharingLinks = [ "linkedin", "twitter", "reddit", "pinterest", "facebook", "email"]
[list]
#showHero = true
diff --git a/data/sharing.json b/data/sharing.json
index 7a43b491..5c89852b 100644
--- a/data/sharing.json
+++ b/data/sharing.json
@@ -1,34 +1,32 @@
{
- "links": {
- "email": {
- "icon": "email",
- "title": "sharing.email",
- "url": "mailto:?body=%s&subject=%s"
- },
- "facebook": {
- "icon": "facebook",
- "title": "sharing.facebook",
- "url": "https://www.facebook.com/sharer/sharer.php?u=%s"e=%s"
- },
- "linkedin": {
- "icon": "linkedin",
- "title": "sharing.linkedin",
- "url": "https://www.linkedin.com/shareArticle?mini=true&url=%s&title=%s"
- },
- "pinterest": {
- "icon": "pinterest",
- "title": "sharing.pinterest",
- "url": "https://pinterest.com/pin/create/bookmarklet/?url=%s&description=%s"
- },
- "reddit": {
- "icon": "reddit",
- "title": "sharing.reddit",
- "url": "https://reddit.com/submit/?url=%s&resubmit=true&title=%s"
- },
- "twitter": {
- "icon": "twitter",
- "title": "sharing.twitter",
- "url": "https://twitter.com/intent/tweet/?url=%s&text=%s"
- }
+ "email": {
+ "icon": "email",
+ "title": "sharing.email",
+ "url": "mailto:?body=%s&subject=%s"
+ },
+ "facebook": {
+ "icon": "facebook",
+ "title": "sharing.facebook",
+ "url": "https://www.facebook.com/sharer/sharer.php?u=%s"e=%s"
+ },
+ "linkedin": {
+ "icon": "linkedin",
+ "title": "sharing.linkedin",
+ "url": "https://www.linkedin.com/shareArticle?mini=true&url=%s&title=%s"
+ },
+ "pinterest": {
+ "icon": "pinterest",
+ "title": "sharing.pinterest",
+ "url": "https://pinterest.com/pin/create/bookmarklet/?url=%s&description=%s"
+ },
+ "reddit": {
+ "icon": "reddit",
+ "title": "sharing.reddit",
+ "url": "https://reddit.com/submit/?url=%s&resubmit=true&title=%s"
+ },
+ "twitter": {
+ "icon": "twitter",
+ "title": "sharing.twitter",
+ "url": "https://twitter.com/intent/tweet/?url=%s&text=%s"
}
-}
+}
\ No newline at end of file
diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml
index 13d0d64c..efe3a93d 100644
--- a/exampleSite/config/_default/params.toml
+++ b/exampleSite/config/_default/params.toml
@@ -64,7 +64,7 @@ defaultBackgroundImage = "/img/iceland.jpg"
showAuthorsBadges = true
showWordCount = false
showSummary = true
- sharingLinks = [ "linkedin", "twitter", "whatsapp", "pinterest", "reddit", "facebook", "email"]
+ sharingLinks = [ "linkedin", "twitter", "reddit", "pinterest", "facebook", "email"]
[list]
showHero = true
diff --git a/layouts/partials/sharing-links.html b/layouts/partials/sharing-links.html
index 91365591..67b29235 100644
--- a/layouts/partials/sharing-links.html
+++ b/layouts/partials/sharing-links.html
@@ -1,16 +1,17 @@
{{ with .Params.sharingLinks | default (.Site.Params.article.sharingLinks | default false) }}
+ {{ $links := site.Data.sharing }}
- {{ range $.Site.Data.sharing.links }}
- {{ with . }}
-
- {{ partial "icon.html" .icon }}
-
+ {{ range . }}
+ {{ with index $links . }}
+
+ {{ partial "icon.html" .icon }}
+
{{ end }}
{{ end }}
From 32af7dde2b5984633efe28a7cd812f4e3c43f2b8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?=
Date: Sun, 1 Jan 2023 21:38:43 +0000
Subject: [PATCH 12/12] final polish
---
config/_default/config.toml | 2 +-
exampleSite/config/_default/config.toml | 2 ++
package.json | 2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/config/_default/config.toml b/config/_default/config.toml
index 585c0f2d..3a0a8bea 100644
--- a/config/_default/config.toml
+++ b/config/_default/config.toml
@@ -6,7 +6,7 @@
# baseURL = "https://your_domain.com/"
defaultContentLanguage = "en"
-# pluralizeListTitles = "true"
+# pluralizeListTitles = "true" # hugo function useful for non-english languages, find out more in https://gohugo.io/getting-started/configuration/#pluralizelisttitles
enableRobotsTXT = true
paginate = 20
diff --git a/exampleSite/config/_default/config.toml b/exampleSite/config/_default/config.toml
index 9af54860..668d0d88 100644
--- a/exampleSite/config/_default/config.toml
+++ b/exampleSite/config/_default/config.toml
@@ -6,6 +6,8 @@ theme = "blowfish"
baseURL = "https://nunocoracao.github.io/blowfish"
defaultContentLanguage = "en"
+# pluralizeListTitles = "true" # hugo function useful for non-english languages, find out more in https://gohugo.io/getting-started/configuration/#pluralizelisttitles
+
enableRobotsTXT = true
paginate = 20
summaryLength = 30
diff --git a/package.json b/package.json
index fa46078f..df078707 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "hugo-blowfish-theme",
- "version": "2.22.0",
+ "version": "2.22.1",
"description": "Blowfish theme for Hugo",
"scripts": {
"fullinstall": "npm run preinstall && npm install && npm run postinstall",