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