diff --git a/exampleSite/content/basics/migration/_index.en.md b/exampleSite/content/basics/migration/_index.en.md index 766913c5f3..fea8fdddc2 100644 --- a/exampleSite/content/basics/migration/_index.en.md +++ b/exampleSite/content/basics/migration/_index.en.md @@ -42,7 +42,13 @@ This document shows you what's new in the latest release and flags it with one o You may experience slight changes for some icons. In addition you have additional ~1700 icons [to chose](https://fontawesome.com/v6/search?m=free) from. -- {{% badge style="note" title=" " %}}Change{{% /badge %}} The [`include` shortcode](shortcodes/include) is now able to resolve links to resources as well as to files in the file system (the old behavior). You can configure to generate warnings or errors during build by setting `include.errorlevel` to either `warning` or `error` in your `hugo.toml` if a path can not be resolved. +- {{% badge style="note" title=" " %}}Change{{% /badge %}} The [`children` shortcode](shortcodes/children) was fixed to adhere to its documentation generating the description based on this rule: When no description or summary exists for the page, the first 70 words of the content is taken. + + Previously, the summary erroneously was ignored which now can lead to different output if you set `description=true` as a parameter. + + In addition, all places where descriptions are printed, now behave in the same way. + +- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} The [`include` shortcode](shortcodes/include) is now able to resolve links to resources as well as to files in the file system (the old behavior). You can configure to generate warnings or errors during build by setting `include.errorlevel` to either `warning` or `error` in your `hugo.toml` if a path can not be resolved. - {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} Math is now usable without enclosing it in a shortcode or codefence by using Hugo's [passthrough configuration](shortcodes/math#passthrough-configuration). diff --git a/layouts/_default/index.json b/layouts/_default/index.json index b98d445dae..620267ec1f 100644 --- a/layouts/_default/index.json +++ b/layouts/_default/index.json @@ -7,7 +7,7 @@ "title" (partial "pageHelper/title.hugo" (dict "page" .)) "tags" .Params.tags "breadcrumb" (trim ((partial "breadcrumbs.html" (dict "page" . "dirOnly" true)) | plainify | htmlUnescape) "\n\r\t ") - "description" .Description + "description" (or .Description .Summary site.Params.Description) "content" (.Plain | htmlUnescape) ) }} {{- end }} diff --git a/layouts/_default/index.search.js b/layouts/_default/index.search.js index c0c40428d6..3b30653062 100644 --- a/layouts/_default/index.search.js +++ b/layouts/_default/index.search.js @@ -7,7 +7,7 @@ "title" (partial "pageHelper/title.hugo" (dict "page" .)) "tags" .Params.tags "breadcrumb" (trim ((partial "breadcrumbs.html" (dict "page" . "dirOnly" true)) | plainify | htmlUnescape) "\n\r\t ") - "description" .Description + "description" (or .Description .Summary site.Params.Description) "content" (.Plain | htmlUnescape) ) }} {{- end }} diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html index 9839f67b96..a45fe46781 100644 --- a/layouts/partials/meta.html +++ b/layouts/partials/meta.html @@ -13,7 +13,7 @@ {{- if not (and .Title (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSeoHiddenPages true) ) ) }} {{- end }} - + {{- $authorName := partialCached "authorname.hugo" . }} {{- partial "twitter_cards.html" . }} diff --git a/layouts/partials/opengraph.html b/layouts/partials/opengraph.html index 2bfc469062..6f8e314830 100644 --- a/layouts/partials/opengraph.html +++ b/layouts/partials/opengraph.html @@ -12,7 +12,7 @@ {{- end }} -{{- with or .Description .Summary site.Params.description | plainify }} +{{- with or .Description .Summary site.Params.Description | plainify }} {{- end }} diff --git a/layouts/partials/shortcodes/children.html b/layouts/partials/shortcodes/children.html index 5f2bfc2b77..c4af90fff3 100644 --- a/layouts/partials/shortcodes/children.html +++ b/layouts/partials/shortcodes/children.html @@ -37,30 +37,24 @@ {{- $numn := add $num $.count }} {{ (printf "" $numn)|safeHTML }}{{ if .RelPermalink }}{{ .Title }}{{ else }}{{ .Title }}{{ end }}{{ (printf "" $numn)|safeHTML }} {{- if $.description }} - {{- if .Description -}} -

{{ .Description }}

- {{- else -}} -

{{ .Summary }}

+ {{- with or .Description .Summary site.Params.Description -}} +

{{ . }}

{{- end }} {{- end }} {{- else if eq $.style "li" }} {{ (printf "<%s>" $.style)|safeHTML }}{{ if .RelPermalink }}{{ .Title }}{{ else }}{{ .Title }}{{ end }} {{- if $.description }} - {{- if .Description -}} -

{{ .Description }}

- {{- else -}} -

{{ .Summary }}

+ {{- with or .Description .Summary site.Params.Description -}} +

{{ . }}

{{- end }} {{- end }} {{- else }} {{ (printf "<%s>" $.style)|safeHTML }}{{ if .RelPermalink }}{{ .Title }}{{ else }}{{ .Title }}{{ end }}{{ (printf "" $.style)|safeHTML }} {{- if $.description }} - {{- if .Description -}} -

{{ .Description }}

- {{- else -}} -

{{ .Summary }}

+ {{- with or .Description .Summary site.Params.Description -}} +

{{ . }}

{{- end }} {{- end }} diff --git a/layouts/partials/twitter_cards.html b/layouts/partials/twitter_cards.html index f6c0c514aa..ae16d706b7 100644 --- a/layouts/partials/twitter_cards.html +++ b/layouts/partials/twitter_cards.html @@ -7,7 +7,7 @@ {{- end }} - + {{- $twitterSite := "" }} {{- with site.Params.social }}