File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
themes/arm-design-system-hugo-theme/layouts/partials/head Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 5151 {{- with .Params.author }}{{ $j = merge $j (dict "author" (dict "@type" "Person" "name" .)) }}{{ end -}}
5252 {{- if $keywords }}{{ $j = merge $j (dict "keywords" (delimit (uniq $keywords) ", ")) }}{{ end -}}
5353 {{- with .Site.Title }}{{ $j = merge $j (dict "provider" (dict "@type" "Organization" "name" .)) }}{{ end -}}
54+
55+ {{- $j = merge $j (dict "offers" (slice (dict "@type" "Offer" "category" "Free"))) -}}
56+ {{- $ci := dict "@type" "CourseInstance" "courseMode" "Online" -}}
57+ {{- if $duration }}{{ $ci = merge $ci (dict "courseWorkload" $duration) }}{{ end -}}
58+ {{- with .Params.course_instances -}}
59+ {{- $instances := slice -}}
60+ {{- range . -}}
61+ {{- $i := dict "@type" "CourseInstance" -}}
62+ {{- with .courseMode }}{{ $i = merge $i (dict "courseMode" .) }}{{ end -}}
63+ {{- with .courseWorkload }}{{ $i = merge $i (dict "courseWorkload" .) }}{{ end -}}
64+ {{- $instances = $instances | append $i -}}
65+ {{- end -}}
66+ {{- if gt (len $instances) 0 }}{{ $j = merge $j (dict "hasCourseInstance" $instances) }}{{ else }}{{ $j = merge $j (dict "hasCourseInstance" (slice $ci)) }}{{ end -}}
67+ {{- else -}}
68+ {{- $j = merge $j (dict "hasCourseInstance" (slice $ci)) -}}
69+ {{- end -}}
5470 {{/* -------- Emit into < head > */}}
5571< script type ="application/ld+json ">
5672 { { - /* prettify the JSON (2‑space indent) and mark it as safe JS */ - } }
You can’t perform that action at this time.
0 commit comments