mirror of https://github.com/jpanther/congo.git
🚸 Add sharing links to front matter
parent
527d3d101e
commit
db134785e4
|
@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
- Article summary support
|
- Article summary support
|
||||||
- Slate colour scheme ([#9](https://github.com/jpanther/congo/pull/9))
|
- Slate colour scheme ([#9](https://github.com/jpanther/congo/pull/9))
|
||||||
- Icons for ORCID and ResearchGate ([#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
|
### Changed
|
||||||
|
|
||||||
|
|
|
@ -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`.|
|
|`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`.|
|
|`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.|
|
|`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.|
|
|`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.|
|
|`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.|
|
|`showEdit`|boolean|`article.showEdit`|Whether or not the link to edit the article content should be displayed.|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{{ with .Site.Params.article.sharingLinks }}
|
{{ with .Params.sharingLinks | default (.Site.Params.article.sharingLinks | default false) }}
|
||||||
{{ $links := site.Data.sharing }}
|
{{ $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 . }}
|
{{ range . }}
|
||||||
|
|
Loading…
Reference in New Issue