Browse Source

Caddy 2

master
Jan-Lukas Else 1 year ago
parent
commit
71937cffc9
  1. 4
      layouts/index.redir.txt

4
layouts/index.redir.txt

@ -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 -}}