show frontmatter description if available as summary
This commit is contained in:
parent
3ae446e96d
commit
49b6f15701
|
@ -8,7 +8,7 @@
|
|||
"title" .Title
|
||||
"date" (.Date.Format "2006-01-02")
|
||||
"tags" (sort (or .Params.tags slice))
|
||||
"summary" .Summary
|
||||
"summary" (or .Params.description .Summary)
|
||||
"text" (lower .Plain)
|
||||
"link" .Permalink
|
||||
"image" (or .Params.Image "")) }}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"title" .Title
|
||||
"date" (.Date.Format "2006-01-02")
|
||||
"tags" (sort (or .Params.tags slice))
|
||||
"summary" .Summary
|
||||
"summary" (or .Params.description .Summary)
|
||||
"link" .Permalink
|
||||
"image" (or .Params.Image "")) }}
|
||||
{{ end }}
|
||||
|
|
|
@ -23,7 +23,13 @@
|
|||
{{end}}
|
||||
{{ if (site.Params.articleSummary | default true) }}
|
||||
<div class="articlePreview">
|
||||
<p>{{ .Summary }}</p>
|
||||
<p>
|
||||
{{ if .Params.description }}
|
||||
{{ .Params.description }}
|
||||
{{ else }}
|
||||
{{.Summary }}
|
||||
{{ end }}
|
||||
</p>
|
||||
<p><a href="{{ .Permalink }}">{{ i18n "continueReading" }} </a></p>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in New Issue