1
Fork 0
master
Jan-Lukas Else 3 years ago
parent 2c7223633c
commit 71937cffc9

@ -1,7 +1,7 @@
{{- range $p := .Site.Pages -}}
{{ range .Aliases }}
{{- $trimmed := ( strings.TrimSuffix "/" ( strings.TrimPrefix "/" . ) ) }}
/{{ $trimmed }} {{ $p.RelPermalink }}
/{{ $trimmed }}/ {{ $p.RelPermalink -}}
redir /{{ $trimmed }} {{ $p.RelPermalink }} 301
redir /{{ $trimmed }}/ {{ $p.RelPermalink }} 301
{{ end -}}
{{- end -}}