move site-related headers/redirects out of netlify.toml

[skip ci]
This commit is contained in:
2020-07-29 08:36:49 -04:00
parent 2c7939b2e7
commit bb3ec74822
20 changed files with 47 additions and 460 deletions
+5
View File
@@ -2,3 +2,8 @@
# https://github.com/w3c/manifest/issues/689
/site.webmanifest
Content-Type: application/manifest+json
# AMP cache invalidation key requirements:
# https://developers.google.com/amp/cache/update-cache#update-cache-guidelines
/.well-known/amphtml/apikey.pub
Content-Type: text/plain; charset=UTF-8
+18 -5
View File
@@ -1,8 +1,21 @@
# Prefer Netlify redirects over Hugo aliases
# https://www.netlify.com/docs/redirects/
/index.php* / 301
/feed /feed.xml 301
/rss /feed.xml 301
/index.xml /feed.xml 301
{{ range $p := .Site.Pages -}}
{{- range .Aliases }}
{{- . | printf "%-35s" }} {{ $p.RelPermalink }} 301
{{- with .Site.Params.social.webmentionIO }}
/xmlrpc.php https://webmention.io/{{ . }}/xmlrpc 302
{{ end -}}
/favicon.ico /img/favicon.ico 200
/favicon-* /img/favicon-:splat 200
/apple-touch-icon.png /img/apple-touch-icon.png 200
/apple-touch-icon-precomposed.png /img/apple-touch-icon.png 200
/safari-pinned-tab.svg /img/safari-pinned-tab.svg 200
# Hugo aliases: prefer HTTP 301 redirects over meta tags
{{- range $page := .Site.Pages }}
{{- range .Aliases }}
{{ . }} {{ $page.RelPermalink }} 301
{{- end }}
{{- end }}