refactor: unify title and description handling in meta files (#329)
This commit is contained in:
parent
d94859e4ae
commit
d2668b43f6
24 changed files with 240 additions and 105 deletions
13
layouts/partials/utils/description.html
Normal file
13
layouts/partials/utils/description.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
{{ $description := "" }}
|
||||
|
||||
{{ if .Description }}
|
||||
{{ $description = .Description }}
|
||||
{{ else }}
|
||||
{{ if .IsPage }}
|
||||
{{ $description = .Summary }}
|
||||
{{ else if .Site.Params.description }}
|
||||
{{ $description = .Site.Params.description }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ return $description }}
|
Loading…
Add table
Add a link
Reference in a new issue