Fix redundant .MediaType.Suffix (#100)

Fix alternative output formats list:
* Fix redundant .MediaType.Suffix
* Correct `title` attribute value to page title
This commit is contained in:
Tong Wu 2019-10-27 03:23:28 -07:00 committed by Track3
parent 91a18a1a92
commit f6d80e4407

View file

@ -13,7 +13,7 @@
{{- partial "favicons.html" }}
<title>{{.Title}}</title>
{{ range .AlternativeOutputFormats -}}
{{ printf `<link rel="%s" type="%s+%s" href="%s" title="%s" />` .Rel .MediaType.Type .MediaType.Suffix .Permalink $.Site.Title | safeHTML }}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Title | safeHTML }}
{{ end -}}
{{ $style := resources.Get "scss/style.scss" | resources.ExecuteAsTemplate "css/style.css" . | toCSS | minify | fingerprint -}}
<link rel="stylesheet" href="{{ $style.Permalink }}" {{ printf "integrity=%q" $style.Data.Integrity | safeHTMLAttr }} crossorigin="anonymous">