diff --git a/CHANGELOG.md b/CHANGELOG.md index 0cada51f..96c6357b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Article summary support - Slate colour scheme ([#9](https://github.com/jpanther/congo/pull/9)) - Icons for ORCID and ResearchGate ([#9](https://github.com/jpanther/congo/pull/9)) +- Sharing links can now be specified in front matter ### Changed diff --git a/exampleSite/content/docs/front-matter.md b/exampleSite/content/docs/front-matter.md index bd67d2a2..b8913d2d 100644 --- a/exampleSite/content/docs/front-matter.md +++ b/exampleSite/content/docs/front-matter.md @@ -20,6 +20,7 @@ Front matter parameter default values are inherited from the theme's [base confi |`editAppendPath`|boolean|`article.editAppendPath`|When `showEdit` is active, whether or not the path to the current article should be appended to the URL set at `editURL`.| |`menu`|string or array|_Not set_|When a value is provided, a link to this article will appear in the named menus. Valid values are `main` or `footer`.| |`robots`|string|_Not set_|String that indicates how robots should handle this article. If set, it will be output in the page head. Refer to [Google's docs](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives) for valid values.| +|`sharingLinks`|array of strings|`article.sharingLinks`|Which sharing links to display at the end of this article. When not provided, or set to `false` no links will be displayed.| |`showAuthor`|boolean|`article.showAuthor`|Whether or not the author box is displayed in the article footer.| |`showDate`|boolean|`article.showDate`|Whether or not article dates are displayed.| |`showEdit`|boolean|`article.showEdit`|Whether or not the link to edit the article content should be displayed.| diff --git a/layouts/partials/sharing-links.html b/layouts/partials/sharing-links.html index 4dbdfc80..a3d9a5ae 100644 --- a/layouts/partials/sharing-links.html +++ b/layouts/partials/sharing-links.html @@ -1,4 +1,4 @@ -{{ with .Site.Params.article.sharingLinks }} +{{ with .Params.sharingLinks | default (.Site.Params.article.sharingLinks | default false) }} {{ $links := site.Data.sharing }}
{{ range . }}