dencold / hasper

a port of Ghost's casper theme for Hugo
MIT License
22 stars 7 forks source link

Fix RSS config variables #30

Open dencold opened 7 years ago

dencold commented 7 years ago

The theme hasper was forked from defined a variable RSSLink in the .Site.Params section, however, Hugo has its own Site variable with the same name. This makes it confusing for theme consumers. Which variable is the correct one to set??

Simplify this configuration by using the canonical path: .Site.RSSLink and remove all references to .Site.Params.RSSLink.

Here are references within Hasper:

./layouts/partials/head/links.html:{{if .Site.Params.RSSLink}}
./layouts/partials/head/links.html:<link href="{{.Site.Params.RSSLink}}" rel="alternate"
./layouts/partials/head/links.html:<link href="{{.RSSLink}}" rel="alternate" type="application/rss+xml"
./layouts/partials/nav.html:{{$rss_link := or .Site.Params.RSSLink .RSSLink}}
./layouts/partials/navigation.html:{{$rss_link := or .Site.Params.RSSLink .RSSLink}}