1

Meilleure gestion des redirections

This commit is contained in:
2026-04-06 16:17:55 +02:00
parent a261d03447
commit c1a6722b93
3 changed files with 18 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ enableEmoji: true
enableGitInfo: true enableGitInfo: true
timeZone: Europe/Paris timeZone: Europe/Paris
theme: ["2026"] theme: ["2026"]
disableAliases: true
security: security:
funcs: funcs:
getenv: getenv:
@@ -17,3 +18,12 @@ security:
params: params:
lists: lists:
layout: spotlight layout: spotlight
mediaTypes:
text/redirects:
delimiter: ""
outputFormats:
redirects:
baseName: _redirects
isPlainText: true
mediaType: text/redirects
root: true

View File

@@ -1,6 +1,7 @@
home: home:
- html - html
- rss - rss
- redirects
section: html section: html
taxonomy: html taxonomy: html
term: html term: html

7
layouts/home.redirects Normal file
View File

@@ -0,0 +1,7 @@
{{- range site.RegularPages -}}
{{- $target := .RelPermalink -}}
{{- range .Aliases -}}
{{- $alias := replace . " " "%20" -}}
{{- printf "redir %s %s permanent\n" $alias $target -}}
{{- end -}}
{{- end -}}