davidhampgonsalves / hugo-black-and-light-theme

A High contrast, text oriented, performant and Javascript-free theme for Hugo.
https://themes.gohugo.io/themes/hugo-black-and-light-theme/
GNU General Public License v3.0
193 stars 94 forks source link

RSS link doesn't validate #20

Closed skyfaller closed 4 years ago

skyfaller commented 4 years ago

When I ran my site through https://validator.w3.org/nu/ after updating to the latest version of the theme it choked on the atom link that you installed in this commit:

    {{ with .OutputFormats.Get "RSS" }}
        {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
    {{ end }}

The sample at https://gohugo.io/templates/rss/ validates and seems to work fine:

{{ range .AlternativeOutputFormats -}}
    {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}

Is there any reason not to use what the Hugo documentation recommends here?

davidhampgonsalves commented 4 years ago

probably b/c that was the old way of doing RSS. Thanks for reporting.