diff --git a/data/sharing.json b/data/sharing.json index 34e60899..7a43b491 100644 --- a/data/sharing.json +++ b/data/sharing.json @@ -1,32 +1,34 @@ { - "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" + "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" + } } } diff --git a/layouts/partials/sharing-links.html b/layouts/partials/sharing-links.html index ca0162c6..923cd6e6 100644 --- a/layouts/partials/sharing-links.html +++ b/layouts/partials/sharing-links.html @@ -1,8 +1,7 @@ {{ with .Params.sharingLinks | default (.Site.Params.article.sharingLinks | default false) }} - {{ $links := site.Data.sharing }}
- {{ range . }} - {{ with index $links . }} + {{ range $.Site.Data.sharing.links }} + {{ with . }}