mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-04-24 00:41:52 +02:00
Merge pull request #366 from nunocoracao/361-articlesharinglinks-option-doesnt-work
🐛 fix for sharing links parameter in params.toml config file
This commit is contained in:
commit
58833a83ca
4 changed files with 44 additions and 45 deletions
|
@ -65,7 +65,7 @@ enableCodeCopy = true
|
||||||
showAuthorsBadges = false
|
showAuthorsBadges = false
|
||||||
showWordCount = true
|
showWordCount = true
|
||||||
showSummary = true
|
showSummary = true
|
||||||
sharingLinks = [ "linkedin", "twitter", "whatsapp", "pinterest", "reddit", "facebook", "email"]
|
sharingLinks = [ "linkedin", "twitter", "reddit", "pinterest", "facebook", "email"]
|
||||||
|
|
||||||
[list]
|
[list]
|
||||||
#showHero = true
|
#showHero = true
|
||||||
|
|
|
@ -1,34 +1,32 @@
|
||||||
{
|
{
|
||||||
"links": {
|
"email": {
|
||||||
"email": {
|
"icon": "email",
|
||||||
"icon": "email",
|
"title": "sharing.email",
|
||||||
"title": "sharing.email",
|
"url": "mailto:?body=%s&subject=%s"
|
||||||
"url": "mailto:?body=%s&subject=%s"
|
},
|
||||||
},
|
"facebook": {
|
||||||
"facebook": {
|
"icon": "facebook",
|
||||||
"icon": "facebook",
|
"title": "sharing.facebook",
|
||||||
"title": "sharing.facebook",
|
"url": "https://www.facebook.com/sharer/sharer.php?u=%s"e=%s"
|
||||||
"url": "https://www.facebook.com/sharer/sharer.php?u=%s"e=%s"
|
},
|
||||||
},
|
"linkedin": {
|
||||||
"linkedin": {
|
"icon": "linkedin",
|
||||||
"icon": "linkedin",
|
"title": "sharing.linkedin",
|
||||||
"title": "sharing.linkedin",
|
"url": "https://www.linkedin.com/shareArticle?mini=true&url=%s&title=%s"
|
||||||
"url": "https://www.linkedin.com/shareArticle?mini=true&url=%s&title=%s"
|
},
|
||||||
},
|
"pinterest": {
|
||||||
"pinterest": {
|
"icon": "pinterest",
|
||||||
"icon": "pinterest",
|
"title": "sharing.pinterest",
|
||||||
"title": "sharing.pinterest",
|
"url": "https://pinterest.com/pin/create/bookmarklet/?url=%s&description=%s"
|
||||||
"url": "https://pinterest.com/pin/create/bookmarklet/?url=%s&description=%s"
|
},
|
||||||
},
|
"reddit": {
|
||||||
"reddit": {
|
"icon": "reddit",
|
||||||
"icon": "reddit",
|
"title": "sharing.reddit",
|
||||||
"title": "sharing.reddit",
|
"url": "https://reddit.com/submit/?url=%s&resubmit=true&title=%s"
|
||||||
"url": "https://reddit.com/submit/?url=%s&resubmit=true&title=%s"
|
},
|
||||||
},
|
"twitter": {
|
||||||
"twitter": {
|
"icon": "twitter",
|
||||||
"icon": "twitter",
|
"title": "sharing.twitter",
|
||||||
"title": "sharing.twitter",
|
"url": "https://twitter.com/intent/tweet/?url=%s&text=%s"
|
||||||
"url": "https://twitter.com/intent/tweet/?url=%s&text=%s"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -64,7 +64,7 @@ defaultBackgroundImage = "/img/iceland.jpg"
|
||||||
showAuthorsBadges = true
|
showAuthorsBadges = true
|
||||||
showWordCount = false
|
showWordCount = false
|
||||||
showSummary = true
|
showSummary = true
|
||||||
sharingLinks = [ "linkedin", "twitter", "whatsapp", "pinterest", "reddit", "facebook", "email"]
|
sharingLinks = [ "linkedin", "twitter", "reddit", "pinterest", "facebook", "email"]
|
||||||
|
|
||||||
[list]
|
[list]
|
||||||
showHero = true
|
showHero = true
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
{{ with .Params.sharingLinks | default (.Site.Params.article.sharingLinks | default false) }}
|
{{ with .Params.sharingLinks | default (.Site.Params.article.sharingLinks | default false) }}
|
||||||
|
{{ $links := site.Data.sharing }}
|
||||||
<section class="flex flex-row flex-wrap justify-center pt-4 text-xl">
|
<section class="flex flex-row flex-wrap justify-center pt-4 text-xl">
|
||||||
{{ range $.Site.Data.sharing.links }}
|
{{ range . }}
|
||||||
{{ with . }}
|
{{ with index $links . }}
|
||||||
<a
|
<a
|
||||||
target="_blank"
|
target="_blank"
|
||||||
class="m-1 rounded bg-neutral-300 p-1.5 text-neutral-700 hover:bg-primary-500 hover:text-neutral dark:bg-neutral-700 dark:text-neutral-300 dark:hover:bg-primary-400 dark:hover:text-neutral-800"
|
class="m-1 rounded bg-neutral-300 p-1.5 text-neutral-700 hover:bg-primary-500 hover:text-neutral dark:bg-neutral-700 dark:text-neutral-300 dark:hover:bg-primary-400 dark:hover:text-neutral-800"
|
||||||
href="{{ printf .url $.Permalink $.Title }}"
|
href="{{ printf .url $.Permalink $.Title }}"
|
||||||
title="{{ i18n .title }}"
|
title="{{ i18n .title }}"
|
||||||
aria-label="{{ i18n .title }}"
|
aria-label="{{ i18n .title }}"
|
||||||
>
|
>
|
||||||
{{ partial "icon.html" .icon }}
|
{{ partial "icon.html" .icon }}
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</section>
|
</section>
|
||||||
|
|
Loading…
Add table
Reference in a new issue