summaryrefslogtreecommitdiffstats
path: root/layouts/home.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/home.html')
-rw-r--r--layouts/home.html8
1 files changed, 7 insertions, 1 deletions
diff --git a/layouts/home.html b/layouts/home.html
index cffb6bc..f285b41 100644
--- a/layouts/home.html
+++ b/layouts/home.html
@@ -12,7 +12,13 @@
{{ range first 6 $articles }}
{{ $type := .Params.type }}
{{ if not $type }}{{ $type = "article" }}{{ end }}
- {{ $data := dict "title" .Title "type" $type "description" .Summary "date" .Date "url" .RelPermalink "image" .Params.image "featured" .Params.featured }}
+
+ {{ $excerpt := .Params.excerpt }}
+ {{ if not $excerpt }}
+ {{ $excerpt = .Summary | plainify | truncate 150 }}
+ {{ end }}
+
+ {{ $data := dict "title" .Title "type" $type "description" $excerpt "date" .Date "url" .RelPermalink "image" .Params.image "featured" .Params.featured }}
{{ partial "post-card.html" $data }}
{{ end }}
{{ end }}