diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index 32446b87..29bcb929 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -62,6 +62,8 @@ mainSections = ["docs"] sharingLinks = [ "linkedin", "twitter", "whatsapp", "pinterest", "reddit", "facebook", "email"] [list] + showHero = true + heroStyle = "background" # valid options: basic, big, background showBreadcrumbs = false showSummary = false showTableOfContents = true diff --git a/exampleSite/content/docs/configuration/index.md b/exampleSite/content/docs/configuration/index.md index 68ab8c27..9c6ae73b 100644 --- a/exampleSite/content/docs/configuration/index.md +++ b/exampleSite/content/docs/configuration/index.md @@ -155,8 +155,8 @@ Many of the article defaults here can be overridden on a per article basis by sp | `article.showLikes` | `false` | Whether or not article likes are displayed. This requires firebase integrations to be enabled, look below. | | `article.showDateUpdated` | `false` | Whether or not the dates articles were updated are displayed. | | `article.showAuthor` | `true` | Whether or not the author box is displayed in the article footer. | -| `article.showHero` | `true` | Whether the thumbnail image will be shown as a hero image within each article page. | -| `heroStyle` | `basic` | Style to display the hero image, valid options are: `basic`, `big`, `background`. | +| `article.showHero` | `false` | Whether the thumbnail image will be shown as a hero image within each article page. | +| `article.heroStyle` | _Not set_ | Style to display the hero image, valid options are: `basic`, `big`, `background`. | | `article.showBreadcrumbs` | `false` | Whether or not breadcrumbs are displayed in the article header. | | `article.showDraftLabel` | `true` | Whether or not the draft indicator is shown next to articles when site is built with `--buildDrafts`. | | `article.showEdit` | `false` | Whether or not the link to edit the article content should be displayed. | @@ -173,6 +173,8 @@ Many of the article defaults here can be overridden on a per article basis by sp | `article.showWordCount` | `false` | Whether or not article word counts are displayed. | | `article.showComments` | `false` | Whether or not the [comments partial]({{< ref "partials#comments" >}}) is included after the article footer. | | `article.sharingLinks` | _Not set_ | Which sharing links to display at the end of each article. When not provided, or set to `false` no links will be displayed. | +| `list.showHero` | `false` | Whether the thumbnail image will be shown as a hero image within each list page. | +| `list.heroStyle` | _Not set_ | Style to display the hero image, valid options are: `basic`, `big`, `background`. | | `list.showBreadcrumbs` | `false` | Whether or not breadcrumbs are displayed in the header on list pages. | | `list.showTableOfContents` | `false` | Whether or not the table of contents is displayed on list pages. | | `list.showSummary` | `false` | Whether or not article summaries are displayed on list pages. If a summary is not provided in the [front matter]({{< ref "front-matter" >}}), one will be auto generated using the `summaryLength` parameter in the [site configuration](#site-configuration). | diff --git a/layouts/_default/list.html b/layouts/_default/list.html index e9d4cc2d..ec9039eb 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,7 +1,7 @@ {{ define "main" }} -{{ if .Params.showHero | default (.Site.Params.article.showHero | default false) }} -{{ $heroStyle := print "partials/hero/" .Site.Params.article.heroStyle ".html" }} +{{ if .Site.Params.list.showHero | default false }} +{{ $heroStyle := print "partials/hero/" .Site.Params.list.heroStyle ".html" }} {{ if templates.Exists $heroStyle }} {{ partial $heroStyle . }} {{ else }} @@ -14,7 +14,7 @@ {{ if .Params.showBreadcrumbs | default (.Site.Params.list.showBreadcrumbs | default false) }} {{ partial "breadcrumbs.html" . }} {{ end }} -