From ef712c33f9559d798a162c23f3b81e1ca49fffc9 Mon Sep 17 00:00:00 2001 From: MaikelChan Date: Mon, 23 Mar 2026 07:32:50 +0100 Subject: [PATCH 1/3] Fixed layoutBackgroundBlur and layoutBackgroundHeaderSpace not affecting the term page. --- layouts/_default/term.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/_default/term.html b/layouts/_default/term.html index 84d7d7cd..2432ec6b 100644 --- a/layouts/_default/term.html +++ b/layouts/_default/term.html @@ -1,5 +1,5 @@ {{ define "main" }} - {{ .Scratch.Set "scope" "term" }} + {{ .Scratch.Set "scope" "list" }} {{ $showHero := .Params.showHero | default site.Params.term.showHero | default false }} {{ if $showHero }} {{ $heroStyle := print "hero/" site.Params.term.heroStyle ".html" }} From a0fc381ba902710b71adf08347ab34f0a89e544d Mon Sep 17 00:00:00 2001 From: MaikelChan Date: Mon, 23 Mar 2026 08:00:37 +0100 Subject: [PATCH 2/3] Properly implement layoutBackgroundBlur and layoutBackgroundHeaderSpace in term and taxonomy --- config/_default/params.toml | 4 ++++ exampleSite/content/docs/configuration/index.md | 4 ++++ layouts/_default/term.html | 2 +- layouts/_default/terms.html | 2 +- layouts/partials/hero/background.html | 14 +++++++++----- layouts/partials/hero/thumbAndBackground.html | 8 +++++--- 6 files changed, 24 insertions(+), 10 deletions(-) diff --git a/config/_default/params.toml b/config/_default/params.toml index 8b0bf26a..068209ed 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -119,6 +119,8 @@ forgejoDefaultServer = "https://v11.next.forgejo.org" showTermCount = true showHero = false # heroStyle = "background" # valid options: basic, big, background, thumbAndBackground + layoutBackgroundBlur = true # only used when heroStyle equals background or thumbAndBackground + layoutBackgroundHeaderSpace = true # only used when heroStyle equals background showBreadcrumbs = false showViews = false showLikes = false @@ -128,6 +130,8 @@ forgejoDefaultServer = "https://v11.next.forgejo.org" [term] showHero = false # heroStyle = "background" # valid options: basic, big, background, thumbAndBackground + layoutBackgroundBlur = true # only used when heroStyle equals background or thumbAndBackground + layoutBackgroundHeaderSpace = true # only used when heroStyle equals background showBreadcrumbs = false showViews = false showLikes = false diff --git a/exampleSite/content/docs/configuration/index.md b/exampleSite/content/docs/configuration/index.md index 9e733bb8..9f5d5cdd 100644 --- a/exampleSite/content/docs/configuration/index.md +++ b/exampleSite/content/docs/configuration/index.md @@ -303,6 +303,8 @@ Many of the article defaults here can be overridden on a per article basis by sp | `taxonomy.showHero` | `false` | Whether the thumbnail image will be shown as a hero image within each taxonomy page. | | `taxonomy.heroStyle` | _Not set_ | Style to display the hero image, valid options are: `basic`, `big`, `background`, `thumbAndBackground`. Effective only if `taxonomy.showHero = true`. | | `taxonomy.showBreadcrumbs` | `false` | Whether or not breadcrumbs are displayed in the taxonomy header. | +| `taxonomy.layoutBackgroundBlur` | `true` | Makes the background image in the background taxonomy heroStyle blur with the scroll | +| `taxonomy.layoutBackgroundHeaderSpace` | `true` | Add space between the header and the body. | | `taxonomy.showViews` | `false` | Whether or not article views are displayed. This requires firebase integrations to be enabled, look below. | | `taxonomy.showLikes` | `false` | Whether or not article likes are displayed. This requires firebase integrations to be enabled, look below. | | `taxonomy.showTableOfContents` | `false` | Whether or not the table of contents is displayed on taxonomies. | @@ -315,6 +317,8 @@ Many of the article defaults here can be overridden on a per article basis by sp | `term.showHero` | `false` | Whether the thumbnail image will be shown as a hero image within each term page. | | `term.heroStyle` | _Not set_ | Style to display the hero image, valid options are: `basic`, `big`, `background`, `thumbAndBackground`. Effective only if `term.showHero = true`. | | `term.showBreadcrumbs` | `false` | Whether or not breadcrumbs are displayed in the term header. | +| `term.layoutBackgroundBlur` | `true` | Makes the background image in the background term heroStyle blur with the scroll | +| `term.layoutBackgroundHeaderSpace` | `true` | Add space between the header and the body. | | `term.showViews` | `false` | Whether or not article views are displayed. This requires firebase integrations to be enabled, look below. | | `term.showLikes` | `false` | Whether or not article likes are displayed. This requires firebase integrations to be enabled, look below. | | `term.showTableOfContents` | `false` | Whether or not the table of contents is displayed on terms. | diff --git a/layouts/_default/term.html b/layouts/_default/term.html index 2432ec6b..84d7d7cd 100644 --- a/layouts/_default/term.html +++ b/layouts/_default/term.html @@ -1,5 +1,5 @@ {{ define "main" }} - {{ .Scratch.Set "scope" "list" }} + {{ .Scratch.Set "scope" "term" }} {{ $showHero := .Params.showHero | default site.Params.term.showHero | default false }} {{ if $showHero }} {{ $heroStyle := print "hero/" site.Params.term.heroStyle ".html" }} diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html index 664d2bec..f34cee1b 100644 --- a/layouts/_default/terms.html +++ b/layouts/_default/terms.html @@ -1,5 +1,5 @@ {{ define "main" }} - {{ .Scratch.Set "scope" "list" }} + {{ .Scratch.Set "scope" "terms" }} {{ $showHero := .Params.showHero | default site.Params.taxonomy.showHero | default false }} {{ if $showHero }} {{ $heroStyle := print "hero/" site.Params.taxonomy.heroStyle ".html" }} diff --git a/layouts/partials/hero/background.html b/layouts/partials/hero/background.html index 8f1f568d..ca5b4094 100644 --- a/layouts/partials/hero/background.html +++ b/layouts/partials/hero/background.html @@ -44,15 +44,19 @@ {{ end }} {{ end }} -{{ $isParentList := eq (.Scratch.Get "scope") "list" }} +{{ $scope := .Scratch.Get "scope" }} {{ $shouldBlur := $.Params.layoutBackgroundBlur | default (or - (and ($.Site.Params.article.layoutBackgroundBlur | default true) (not $isParentList)) - (and ($.Site.Params.list.layoutBackgroundBlur | default true) ($isParentList)) + (and ($.Site.Params.article.layoutBackgroundBlur | default true) (eq $scope "single")) + (and ($.Site.Params.list.layoutBackgroundBlur | default true) (eq $scope "list")) + (and ($.Site.Params.taxonomy.layoutBackgroundBlur | default true) (eq $scope "terms")) + (and ($.Site.Params.term.layoutBackgroundBlur | default true) (eq $scope "term")) ) }} {{ $shouldAddHeaderSpace := $.Params.layoutBackgroundHeaderSpace | default (or - (and ($.Site.Params.article.layoutBackgroundHeaderSpace | default true) (not $isParentList)) - (and ($.Site.Params.list.layoutBackgroundHeaderSpace | default true) ($isParentList)) + (and ($.Site.Params.article.layoutBackgroundHeaderSpace | default true) (eq $scope "single")) + (and ($.Site.Params.list.layoutBackgroundHeaderSpace | default true) (eq $scope "list")) + (and ($.Site.Params.taxonomy.layoutBackgroundHeaderSpace | default true) (eq $scope "terms")) + (and ($.Site.Params.term.layoutBackgroundHeaderSpace | default true) (eq $scope "term")) ) }} diff --git a/layouts/partials/hero/thumbAndBackground.html b/layouts/partials/hero/thumbAndBackground.html index 8d073386..3baf1d65 100644 --- a/layouts/partials/hero/thumbAndBackground.html +++ b/layouts/partials/hero/thumbAndBackground.html @@ -76,10 +76,12 @@ {{ end }} {{ end }} -{{ $isParentList := eq (.Scratch.Get "scope") "list" }} +{{ $scope := .Scratch.Get "scope" }} {{ $shouldBlur := $.Params.layoutBackgroundBlur | default (or - (and ($.Site.Params.article.layoutBackgroundBlur | default true) (not $isParentList)) - (and ($.Site.Params.list.layoutBackgroundBlur | default true) ($isParentList)) + (and ($.Site.Params.article.layoutBackgroundBlur | default true) (eq $scope "single")) + (and ($.Site.Params.list.layoutBackgroundBlur | default true) (eq $scope "list")) + (and ($.Site.Params.taxonomy.layoutBackgroundBlur | default true) (eq $scope "terms")) + (and ($.Site.Params.term.layoutBackgroundBlur | default true) (eq $scope "term")) ) }} From 503f60fe752b6af5b245ddd299ae2eb9de7d4817 Mon Sep 17 00:00:00 2001 From: MaikelChan Date: Tue, 24 Mar 2026 03:08:43 +0100 Subject: [PATCH 3/3] Documentation improvements. --- exampleSite/content/docs/configuration/index.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/exampleSite/content/docs/configuration/index.md b/exampleSite/content/docs/configuration/index.md index 9f5d5cdd..1612b738 100644 --- a/exampleSite/content/docs/configuration/index.md +++ b/exampleSite/content/docs/configuration/index.md @@ -244,8 +244,8 @@ Many of the article defaults here can be overridden on a per article basis by sp | `article.showAuthorBottom` | `false` | Author boxes are displayed at the bottom of each page instead of the top. | | `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`, `thumbAndBackground`. Effective only if `article.showHero = true`. | -| `article.layoutBackgroundBlur` | `true` | Makes the background image in the background article heroStyle blur with the scroll | -| `article.layoutBackgroundHeaderSpace` | `true` | Add space between the header and the body. | +| `article.layoutBackgroundBlur` | `true` | Makes the background image in the background article heroStyle blur with the scroll. Only used when `heroStyle` equals `background` or `thumbAndBackground`. | +| `article.layoutBackgroundHeaderSpace` | `true` | Add space between the header and the body. Only used when `heroStyle` equals `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. | @@ -274,9 +274,9 @@ Many of the article defaults here can be overridden on a per article basis by sp | --- | --- | --- | | `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`, `thumbAndBackground`. Effective only if `list.showHero = true`. | +| `list.layoutBackgroundBlur` | `true` | Makes the background image in the background list heroStyle blur with the scroll. Only used when `heroStyle` equals `background` or `thumbAndBackground`. | +| `list.layoutBackgroundHeaderSpace` | `true` | Add space between the header and the body. Only used when `heroStyle` equals `background`. | | `list.showBreadcrumbs` | `false` | Whether or not breadcrumbs are displayed in the header on list pages. | -| `list.layoutBackgroundBlur` | `true` | Makes the background image in the background list heroStyle blur with the scroll | -| `list.layoutBackgroundHeaderSpace` | `true` | Add space between the header and the body. | | `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). | | `list.showViews` | `false` | Whether or not list views are displayed. This requires firebase integrations to be enabled, look below. | @@ -302,9 +302,9 @@ Many of the article defaults here can be overridden on a per article basis by sp | `taxonomy.showTermCount` | `true` | Whether or not the number of articles within a taxonomy term is displayed on the taxonomy listing. | | `taxonomy.showHero` | `false` | Whether the thumbnail image will be shown as a hero image within each taxonomy page. | | `taxonomy.heroStyle` | _Not set_ | Style to display the hero image, valid options are: `basic`, `big`, `background`, `thumbAndBackground`. Effective only if `taxonomy.showHero = true`. | +| `taxonomy.layoutBackgroundBlur` | `true` | Makes the background image in the background taxonomy heroStyle blur with the scroll. Only used when `heroStyle` equals `background` or `thumbAndBackground`. | +| `taxonomy.layoutBackgroundHeaderSpace` | `true` | Add space between the header and the body. Only used when `heroStyle` equals `background`. | | `taxonomy.showBreadcrumbs` | `false` | Whether or not breadcrumbs are displayed in the taxonomy header. | -| `taxonomy.layoutBackgroundBlur` | `true` | Makes the background image in the background taxonomy heroStyle blur with the scroll | -| `taxonomy.layoutBackgroundHeaderSpace` | `true` | Add space between the header and the body. | | `taxonomy.showViews` | `false` | Whether or not article views are displayed. This requires firebase integrations to be enabled, look below. | | `taxonomy.showLikes` | `false` | Whether or not article likes are displayed. This requires firebase integrations to be enabled, look below. | | `taxonomy.showTableOfContents` | `false` | Whether or not the table of contents is displayed on taxonomies. | @@ -316,9 +316,9 @@ Many of the article defaults here can be overridden on a per article basis by sp | --- | --- | --- | | `term.showHero` | `false` | Whether the thumbnail image will be shown as a hero image within each term page. | | `term.heroStyle` | _Not set_ | Style to display the hero image, valid options are: `basic`, `big`, `background`, `thumbAndBackground`. Effective only if `term.showHero = true`. | +| `term.layoutBackgroundBlur` | `true` | Makes the background image in the background term heroStyle blur with the scroll. Only used when `heroStyle` equals `background` or `thumbAndBackground`. | +| `term.layoutBackgroundHeaderSpace` | `true` | Add space between the header and the body. Only used when `heroStyle` equals `background`. | | `term.showBreadcrumbs` | `false` | Whether or not breadcrumbs are displayed in the term header. | -| `term.layoutBackgroundBlur` | `true` | Makes the background image in the background term heroStyle blur with the scroll | -| `term.layoutBackgroundHeaderSpace` | `true` | Add space between the header and the body. | | `term.showViews` | `false` | Whether or not article views are displayed. This requires firebase integrations to be enabled, look below. | | `term.showLikes` | `false` | Whether or not article likes are displayed. This requires firebase integrations to be enabled, look below. | | `term.showTableOfContents` | `false` | Whether or not the table of contents is displayed on terms. |