File tree Expand file tree Collapse file tree 1 file changed +24
-17
lines changed
themes/arm-design-system-hugo-theme/layouts/_default Expand file tree Collapse file tree 1 file changed +24
-17
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 "/" -}}
172175 {{ end }}
173176 {{- end -}}
174177
178+
179+
180+
181+
175182 {{- 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 >
183+
184+
185+ {{/* Ensure a unique ID for each learning path */ }}
186+ {{- $itemidcounter = add $itemidcounter 1 - }}
187+
188+
189+
190+ < foldingcollection >
191+ {{- if .IsSection -}}{{ .Title }}
192+ {{- else -}}{{ .Parent.Title }}
193+ {{- end -}}
194+ </ foldingcollection >
195+ < itemid >{{ md5 .RelPermalink }}</ itemid >
196+ {{- if and .Parent (not .IsSection) (not .Parent.IsPage) (or .Parent.IsSection) }}
197+ < parentitem >{{ md5 .Parent.RelPermalink }}</ parentitem >
198+ {{- end -}}
199+
193200 {{- end -}}
194201 </coveo : metadata >
195202 </url >
You can’t perform that action at this time.
0 commit comments