🚸 Add sharing links to front matter

pull/14/head
James Panther 2021-10-20 10:44:57 +11:00
parent 527d3d101e
commit db134785e4
No known key found for this signature in database
GPG Key ID: D36F789E45745D17
3 changed files with 3 additions and 1 deletions

View File

@ -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

View File

@ -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.|

View File

@ -1,4 +1,4 @@
{{ with .Site.Params.article.sharingLinks }}
{{ 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 . }}