1
0
mirror of https://github.com/danbee/danbarber.me.hugo.git synced 2025-03-04 08:59:18 +00:00

Add head links and redirects for old feed URL's

This commit is contained in:
Daniel Barber 2019-10-25 17:33:20 -04:00
parent c6fbd1425a
commit 4c7855a0bc
2 changed files with 17 additions and 0 deletions

View File

@ -9,3 +9,14 @@
{{ $sass := resources.Get "sass/main.scss" }}
{{ $style := $sass | resources.ToCSS }}
<link rel="stylesheet" href="{{ $style.Permalink }}">
<!-- Links -->
{{ range .AlternativeOutputFormats -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
{{ range .Sections -}}
{{- range .AlternativeOutputFormats }}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{- end }}
{{ end -}}

6
static/_redirects Normal file
View File

@ -0,0 +1,6 @@
/feed.xml /index.xml
/feed.json /index.json
/feed.blog.xml /blog/index.xml
/feed.blog.json /blog/index.json
/feed.photos.xml /photos/index.xml
/feed.photos.json /photos/index.json