diff --git a/layouts/_default/search.json b/layouts/_default/search.json index 5f04f46..f740da8 100644 --- a/layouts/_default/search.json +++ b/layouts/_default/search.json @@ -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 "")) }} diff --git a/layouts/index.json b/layouts/index.json index fa20404..4259ba0 100644 --- a/layouts/index.json +++ b/layouts/index.json @@ -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 }} diff --git a/layouts/partials/article_card.html b/layouts/partials/article_card.html index e263f1f..6a8c7ad 100644 --- a/layouts/partials/article_card.html +++ b/layouts/partials/article_card.html @@ -23,7 +23,13 @@ {{end}} {{ if (site.Params.articleSummary | default true) }}
-

{{ .Summary }}

+

+ {{ if .Params.description }} + {{ .Params.description }} + {{ else }} + {{.Summary }} + {{ end }} +

{{ i18n "continueReading" }} 

{{ end }}