diff --git a/hugo.yaml b/hugo.yaml index 5f40c77..c7bee03 100644 --- a/hugo.yaml +++ b/hugo.yaml @@ -21,6 +21,23 @@ taxonomies: outputs: page: - html + home: + - html + - rss + - REDIR + +outputFormats: + # https://honnef.co/articles/generating-netlify-_redirects-from-hugo/ + REDIR: + mediaType: text/caddy + baseName: _redirects + isPlainText: true + notAlternative: true + +mediaTypes: + # https://honnef.co/articles/generating-netlify-_redirects-from-hugo/ + text/caddy: + delimeter: "" privacy: googleAnalytics: diff --git a/layouts/home.REDIR b/layouts/home.REDIR new file mode 100644 index 0000000..606bc9c --- /dev/null +++ b/layouts/home.REDIR @@ -0,0 +1,7 @@ +{{ range hugo.Sites -}} +{{ range $p := .Pages -}} +{{ range .Aliases -}} +{{ . }} {{ $p.RelPermalink }} +{{ end -}} +{{ end -}} +{{ end -}}