mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-04-23 21: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
|
||||
showWordCount = true
|
||||
showSummary = true
|
||||
sharingLinks = [ "linkedin", "twitter", "whatsapp", "pinterest", "reddit", "facebook", "email"]
|
||||
sharingLinks = [ "linkedin", "twitter", "reddit", "pinterest", "facebook", "email"]
|
||||
|
||||
[list]
|
||||
#showHero = true
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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
|
||||
|
|
|
@ -1,16 +1,17 @@
|
|||
{{ 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">
|
||||
{{ range $.Site.Data.sharing.links }}
|
||||
{{ with . }}
|
||||
<a
|
||||
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"
|
||||
href="{{ printf .url $.Permalink $.Title }}"
|
||||
title="{{ i18n .title }}"
|
||||
aria-label="{{ i18n .title }}"
|
||||
>
|
||||
{{ partial "icon.html" .icon }}
|
||||
</a>
|
||||
{{ range . }}
|
||||
{{ with index $links . }}
|
||||
<a
|
||||
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"
|
||||
href="{{ printf .url $.Permalink $.Title }}"
|
||||
title="{{ i18n .title }}"
|
||||
aria-label="{{ i18n .title }}"
|
||||
>
|
||||
{{ partial "icon.html" .icon }}
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</section>
|
||||
|
|
Loading…
Add table
Reference in a new issue