Fix Learn theme addition to git

This commit is contained in:
Guillaume
2023-05-24 18:17:12 +02:00
parent 56f3665299
commit 8abec325d5
239 changed files with 10525 additions and 1 deletions

View File

@ -0,0 +1,14 @@
{{- if in (.Get 0) "/_index.md" -}}
{{- $paths := (split (.Get 0) "_index.md") -}}
{{- $pagepath := index $paths 0 -}}
{{- $anchor := index $paths 1 -}}
{{- with .Site.GetPage "section" (trim $pagepath "/") -}}
{{- ( printf "%s%s" $pagepath $anchor ) | relLangURL -}}
{{- end -}}
{{- else -}}
{{- with .Site.GetPage "section" (.Get 0) }}
{{- .RelPermalink -}}
{{- else -}}
{{- .Get 0 | relref .Page -}}
{{- end -}}
{{- end -}}