File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
site/themes/arangodb-docs-theme/layouts/_default/_markup Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 2020{{- else }}
2121 {{- $isOnlyFragment := findRE `(?m)^#` $link }}
2222 {{- if $isOnlyFragment }}
23+ {{- $fragments := slice }}
24+ {{- range $k, $v := .Page.Fragments.HeadingsMap }}
25+ {{- $fragments = $fragments | append $k }}
26+ {{- end }}
27+ {{- if not (in $fragments (strings.TrimPrefix "#" $fragment)) }}
28+ {{- $currentFile := .Page.File.Path }}
29+ {{- if site.Params.failOnBrokenLinks }}
30+ {{- errorf "< error code =1 > Broken anchor link '%v' found in %s, available anchors: %v </ error > < br > " $fragment $currentFile (delimit $fragments ", ") }}
31+ {{- else }}
32+ {{- warnf "Broken anchor link '%v' found in %s, available anchors: %v" $fragment $currentPage (delimit $fragments ", ") }}
33+ {{- end }}
34+ {{- end }}
2335 {{- $permalink = $fragment }}
2436 {{- else }}
2537 {{- $page := .Page.GetPage $path }}
You can’t perform that action at this time.
0 commit comments