Browse Source

Caddy 2

master
Jan-Lukas Else 11 months ago
parent
commit
71937cffc9
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      layouts/index.redir.txt

+ 2
- 2
layouts/index.redir.txt View File

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

Loading…
Cancel
Save