Skip to content

Commit 5b3eac0

Browse files
committed
site: truncate schema.org titles at 110 chars
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
1 parent 3a6fef5 commit 5b3eac0

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

layouts/_partials/schema.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{{- $schema := dict
66
"@context" "https://schema.org"
77
"@type" "TechArticle"
8-
"headline" .LinkTitle
8+
"headline" (truncate 110 .LinkTitle)
99
"description" $description
1010
"url" .Permalink
1111
-}}
@@ -76,7 +76,7 @@
7676
{{- $isPartOf := dict
7777
"@type" "WebPage"
7878
"@id" .Permalink
79-
"name" .LinkTitle
79+
"name" (truncate 110 .LinkTitle)
8080
-}}
8181
{{- $schema = merge $schema (dict "isPartOf" $isPartOf) -}}
8282
{{- end -}}
@@ -95,7 +95,7 @@
9595
"position" $position
9696
"item" (dict
9797
"@id" .Permalink
98-
"name" .LinkTitle
98+
"name" (truncate 110 .LinkTitle)
9999
)
100100
-}}
101101
{{- $breadcrumbs = $breadcrumbs | append $item -}}
@@ -109,7 +109,7 @@
109109
"position" $position
110110
"item" (dict
111111
"@id" .Permalink
112-
"name" .LinkTitle
112+
"name" (truncate 110 .LinkTitle)
113113
)
114114
-}}
115115
{{- $breadcrumbs = $breadcrumbs | append $currentItem -}}

0 commit comments

Comments
 (0)