File tree Expand file tree Collapse file tree 1 file changed +29
-18
lines changed
themes/arm-design-system-hugo-theme/layouts/_default Expand file tree Collapse file tree 1 file changed +29
-18
lines changed Original file line number Diff line number Diff line change 33 xmlns : xhtml =" http://www.w3.org/1999/xhtml"
44 xmlns : coveo =" http://www.coveo.com/schemas/metadata" >
55
6+ {{- $itemidcounter := 1 -}}
7+
8+
69
710{{- range where .Site.Pages "Params.sitemap_exclude" "ne" true -}}
811 {{- $pathParts := split .RelPermalink "/" -}}
3134 <coveo : metadata >
3235 <contenttype >Learning Path</contenttype >
3336 <title >
34- {{- .Params.title -}}
37+ {{- if and (.File) (in .File.Path "install-guides") -}}
38+ {{ .Params.title}} - Install Guide
39+ {{- else -}}
40+ {{- .Params.title -}}
41+ {{- end -}}
3542 </title >
3643 <description >
3744 {{- if and (.File) (in .File.Path "learning-paths") -}}
172179 {{ end }}
173180 {{- end -}}
174181
182+
183+
184+
185+
175186 {{- if and (.File) (in .File.Path "learning-paths") -}}
176- < foldingcollection >
177- {{- if .IsSection -}}
178- {{- with .Title - }}
179- {{ . }}
180- {{- else -}}
181- Unknown Section Title
182- {{- end -}}
183- {{- else -}}
184- {{- with .Parent .Title - }}
185- {{ . }}
186- {{- else -}}
187- Unknown Parent Title
188- {{- end -}}
189- {{- end - }}
190- </ foldingcollection >
191- < parentitem >1</ parentitem >
192- < itemid >{{.Params.weight -}}</ itemid >
187+
188+
189+ {{/* Ensure a unique ID for each learning path */ }}
190+ {{- $itemidcounter = add $itemidcounter 1 - }}
191+
192+
193+
194+ < foldingcollection >
195+ {{- if .IsSection -}}{{ .Title }}
196+ {{- else -}}{{ .Parent.Title }}
197+ {{- end -}}
198+ </ foldingcollection >
199+ < itemid >{{ md5 .RelPermalink }}</ itemid >
200+ {{- if and .Parent (not .IsSection) (not .Parent.IsPage) (or .Parent.IsSection) }}
201+ < parentitem >{{ md5 .Parent.RelPermalink }}</ parentitem >
202+ {{- end -}}
203+
193204 {{- end -}}
194205 </coveo : metadata >
195206 </url >
You can’t perform that action at this time.
0 commit comments