File tree 4 files changed +4
-3
lines changed
4 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
10
10
### Changed
11
11
12
12
- Remove author display if both post author and site author are not set [ #354 ] ( https://github.com/g1eny0ung/hugo-theme-dream/pull/354 )
13
+ - Prioritize page descriptions over page summaries [ #356 ] ( https://github.com/g1eny0ung/hugo-theme-dream/pull/356 )
13
14
14
15
## [ 3.10.0] - 2025-01-07
15
16
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ <h2 class="card-title">{{ .Title }}</h2>
38
38
{{ end }}
39
39
</ p >
40
40
41
- {{ . Summary | emojify | safeHTML }}
41
+ {{ or .Description (. Summary | emojify | safeHTML) }}
42
42
43
43
{{ $hasAuthor := or .Params.author site.Params.author }}
44
44
< div class ="card-actions justify-between items-center mt-4 ">
Original file line number Diff line number Diff line change 7
7
{{ if eq .Type "posts" }}
8
8
<!-- Page Author & Description -->
9
9
< meta name ="author " content ="{{ if isset .Params "author " }}{{ .Params.author }}{{ else }}{{ site.Params.author }}{{ end }}" />
10
- < meta name ="description " content ="{{ . Summary | plainify }} " />
10
+ < meta name ="description " content ="{{ (or .Description . Summary) | plainify }} " />
11
11
12
12
<!-- Keywords -->
13
13
{{- $keywords := slice }}
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ <h2 class="card-title" x-text="post.item.title"></h2>
65
65
66
66
{{ $data := slice }}
67
67
{{ range (where site.RegularPages "Type" "posts") }}
68
- {{ $data = $data | append (dict "title" .Title "url" .RelPermalink "author" .Params.author "avatar" .Params.avatar "categories" .Params.categories "tags" .Params.tags "description" (. Summary | emojify | safeHTML) "readingTime" .ReadingTime) }}
68
+ {{ $data = $data | append (dict "title" .Title "url" .RelPermalink "author" .Params.author "avatar" .Params.avatar "categories" .Params.categories "tags" .Params.tags "description" (or .Description (. Summary | emojify | safeHTML) ) "readingTime" .ReadingTime) }}
69
69
{{ end }}
70
70
71
71
< script src ="
https://cdn.jsdelivr.net/npm/[email protected] /dist/fuse.min.js "
integrity ="
sha256-42IbU8t3tOwwbexB7ZVRHm3YDRf65aBPPjRtIUufj5I= "
crossorigin ="
anonymous "
> </ script >
You can’t perform that action at this time.
0 commit comments