Skip to content

Commit 865e5aa

Browse files
authored
Merge pull request #2752 from madeline-underwood/enable-meta-description-field
Enable meta description field
2 parents 04c1eb9 + b0d2c8b commit 865e5aa

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

themes/arm-design-system-hugo-theme/layouts/partials/head/head.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@
2626
<link rel="canonical" href="https://learn.arm.com{{ .Permalink }}" />
2727
<title>{{ $title }}</title>
2828

29+
{{/* Meta description: short, task-oriented summary for SERP and AI selection.
30+
This is intentionally distinct from the JSON-LD description. */}}
31+
{{- with .Params.description -}}
32+
{{- $d := . | plainify | htmlEscape | trim " \t\r\n" -}}
33+
{{- if gt (len $d) 0 -}}
34+
<meta name="description" content="{{ $d }}">
35+
{{- end -}}
36+
{{- end -}}
37+
2938
{{ partial "head/jsonld.html" . }}
3039

3140
<!-- Include the Arm standard Lato font for machines that don't have by default (Mac) -->

themes/arm-design-system-hugo-theme/layouts/partials/head/jsonld.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"@type" "Course"
4444
"name" .Title
4545
-}}
46+
{{/* Schema description: audience-focused explanation for structured data. This is intentionally distinct from the HTML meta description. */}}
4647
{{- with .Params.who_is_this_for }}{{ $j = merge $j (dict "description" ( . | plainify )) }}{{ end -}}
4748
{{- if $duration }}{{ $j = merge $j (dict "timeRequired" $duration) }}{{ end -}}
4849
{{- with .Params.skilllevels }}{{ $j = merge $j (dict "educationalLevel" .) }}{{ end -}}

0 commit comments

Comments
 (0)