From d427baf0e17331211e2d0ea6750fa702681d2be2 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Thu, 26 May 2022 11:43:19 +1000 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20front=20matter=20support=20fo?= =?UTF-8?q?r=20`showBreadcrumbs`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 ++++ exampleSite/content/docs/front-matter.md | 1 + layouts/_default/list.html | 2 +- layouts/_default/simple.html | 2 +- layouts/_default/single.html | 2 +- layouts/_default/taxonomy.html | 2 +- layouts/_default/term.html | 2 +- 7 files changed, 10 insertions(+), 5 deletions(-) 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 "