diff --git a/CHANGELOG.md b/CHANGELOG.md index 322a60d5..73ee8d52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +### Added + +- Breadcrumb display can now be can now be specificed in front matter for articles and list pages + ## [2.2.1] - 2022-05-25 ### Changed diff --git a/exampleSite/content/docs/front-matter.md b/exampleSite/content/docs/front-matter.md index 45571833..170f49f3 100644 --- a/exampleSite/content/docs/front-matter.md +++ b/exampleSite/content/docs/front-matter.md @@ -24,6 +24,7 @@ Front matter parameter default values are inherited from the theme's [base confi |`robots`|_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`|`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`|`article.showAuthor`|Whether or not the author box is displayed in the article footer.| +|`showBreadcrumbs`|`article.showBreadcrumbs` or `list.showBreadcrumbs`|Whether the breadcrumbs are displayed in the article or list header.| |`showDate`|`article.showDate`|Whether or not the article date is displayed. The date is set using the `date` parameter.| |`showDateUpdated`|`article.showDateUpdated`|Whether or not the date the article was updated is displayed. The date is set using the `lastmod` parameter.| |`showEdit`|`article.showEdit`|Whether or not the link to edit the article content should be displayed.| diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 5c14b706..d7d5fc6d 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,7 +1,7 @@ {{ define "main" }} {{ $toc := and (.Params.showTableOfContents | default (.Site.Params.list.showTableOfContents | default false)) (in .TableOfContents " - {{ if .Site.Params.list.showBreadcrumbs | default false }} + {{ if .Params.showBreadcrumbs | default (.Site.Params.list.showBreadcrumbs | default false) }} {{ partial "breadcrumbs.html" . }} {{ end }}

{{ .Title }}

diff --git a/layouts/_default/simple.html b/layouts/_default/simple.html index c902a059..cc884799 100644 --- a/layouts/_default/simple.html +++ b/layouts/_default/simple.html @@ -1,7 +1,7 @@ {{ define "main" }}
- {{ if .Site.Params.article.showBreadcrumbs | default false }} + {{ if .Params.showBreadcrumbs | default (.Site.Params.article.showBreadcrumbs | default false) }} {{ partial "breadcrumbs.html" . }} {{ end }}

diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 8c58014b..b78d7ac4 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,7 +1,7 @@ {{ define "main" }}
- {{ if .Site.Params.article.showBreadcrumbs | default false }} + {{ if .Params.showBreadcrumbs | default (.Site.Params.article.showBreadcrumbs | default false) }} {{ partial "breadcrumbs.html" . }} {{ end }}

diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html index b53aad6d..1247b3b8 100644 --- a/layouts/_default/taxonomy.html +++ b/layouts/_default/taxonomy.html @@ -1,6 +1,6 @@ {{ define "main" }}
- {{ if .Site.Params.list.showBreadcrumbs | default false }} + {{ if .Params.showBreadcrumbs | default (.Site.Params.list.showBreadcrumbs | default false) }} {{ partial "breadcrumbs.html" . }} {{ end }}

{{ .Title }}

diff --git a/layouts/_default/term.html b/layouts/_default/term.html index 53ad164f..4208be48 100644 --- a/layouts/_default/term.html +++ b/layouts/_default/term.html @@ -1,6 +1,6 @@ {{ define "main" }}
- {{ if .Site.Params.list.showBreadcrumbs | default false }} + {{ if .Params.showBreadcrumbs | default (.Site.Params.list.showBreadcrumbs | default false) }} {{ partial "breadcrumbs.html" . }} {{ end }}

{{ .Title }}