From 67dc6ee3c4bfb4f1a9a7a54b4780292b666403da Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Thu, 15 Oct 2020 09:38:10 +0530 Subject: [PATCH] json-schema: limit description to 180 characters --- layouts/partials/templates/schema_json.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/templates/schema_json.html b/layouts/partials/templates/schema_json.html index 82182708..b5a99414 100644 --- a/layouts/partials/templates/schema_json.html +++ b/layouts/partials/templates/schema_json.html @@ -5,7 +5,7 @@ "@type": "{{- ( .Site.Params.schema.publisherType | default "Organization") | humanize -}}", "name": {{ .Site.Title }}, "url": {{ .Site.BaseURL }}, - "description": {{ .Site.Params.description | plainify | safeHTML }}, + "description": {{ .Site.Params.description | plainify | truncate 180 | safeHTML }}, "thumbnailUrl": {{ .Site.Params.assets.favicon | default "favicon.ico" | absURL }}, "sameAs": [ {{- if .Site.Params.schema.sameAs }} @@ -23,7 +23,7 @@ "@type": "BlogPosting", "headline": {{ .Title | plainify}}, "name": "{{ .Title | plainify }}", - "description": {{ .Summary | plainify | safeHTML }}, + "description": {{ .Summary | plainify | truncate 180 | safeHTML }}, "keywords": [ {{- if .Params.keywords }} {{ range $i, $e := .Params.keywords }}{{ if $i }}, {{ end }}{{ $e }}{{ end }}