From ac985ee78c9b3952e2a51294ab97191ef3c59beb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Sat, 2 Dec 2023 01:09:45 +0100 Subject: [PATCH] theme: make heading a template #744 --- exampleSite/content/basics/customization/_index.en.md | 1 + exampleSite/content/basics/migration/_index.en.md | 2 ++ layouts/partials/archetypes/chapter/article.html | 2 +- layouts/partials/archetypes/default/article.html | 2 +- layouts/partials/archetypes/home/article.html | 2 +- layouts/partials/heading.html | 1 + layouts/partials/initial.html | 2 +- 7 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 layouts/partials/heading.html diff --git a/exampleSite/content/basics/customization/_index.en.md b/exampleSite/content/basics/customization/_index.en.md index b42b364ca3..2c790e5a7b 100644 --- a/exampleSite/content/basics/customization/_index.en.md +++ b/exampleSite/content/basics/customization/_index.en.md @@ -203,6 +203,7 @@ This theme defines the following partials : - `custom-header.html`: custom headers in page. Meant to be overwritten when adding CSS imports. Don't forget to include `style` HTML tag directive in your file. - `custom-footer.html`: custom footer in page. Meant to be overwritten when adding JavaScript. Don't forget to include `javascript` HTML tag directive in your file. - `favicon.html`: the favicon +- `heading.html`: side-wide configuration to change the pages title headings. - `heading-pre.html`: side-wide configuration to prepend to pages title headings. If you override this, it is your responsibility to take the page's `headingPre` setting into account. - `heading-post.html`: side-wide configuration to append to pages title headings. If you override this, it is your responsibility to take the page's `headingPost` setting into account. - `logo.html`: the logo, on top left hand corner diff --git a/exampleSite/content/basics/migration/_index.en.md b/exampleSite/content/basics/migration/_index.en.md index 034edcab37..2fb0712237 100644 --- a/exampleSite/content/basics/migration/_index.en.md +++ b/exampleSite/content/basics/migration/_index.en.md @@ -28,6 +28,8 @@ This document shows you what's new in the latest release and flags it with one o The advanced functionality allows you to set an explicit name for a theme variant, set different colors (if you are using monochrome SVGs) or even different icons (handy if you want to adjust colors for PNGs, GIFs or JPGs) and now allows for multiple auto mode variants that adjust to the light/dark preference of your OS settings. +- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} New partial for defining the heading. See [documentation](basics/customization#partials) for further reading. + --- ## 5.23.0 (2023-11-03) {#5230} diff --git a/layouts/partials/archetypes/chapter/article.html b/layouts/partials/archetypes/chapter/article.html index a36d250bf5..30ff708264 100644 --- a/layouts/partials/archetypes/chapter/article.html +++ b/layouts/partials/archetypes/chapter/article.html @@ -6,7 +6,7 @@ {{- partial "content-header.html" . }} {{ partial "heading-pre.html" . }}
{{ T "Chapter" .Params.Weight }}
-

{{ .Title }}

{{ partial "heading-post.html" . }} +{{ partial "heading.html" . }}{{ partial "heading-post.html" . }} {{ $content | safeHTML }}