Closed jpawlowski closed 5 years ago
@kaushalmodi
hope I did it the right way.
This (saw your refactoring) will break the site build (I believe) if site.Params.feed is absent altogether.
You'll need to wrap that code in with site.Param "feed"
As an example, see this: https://gitlab.com/kaushalmodi/hugo-theme-refined/blob/master/layouts/partials/social.html
Which parses this in config.toml
:
[[Params.social]]
name = "Github"
link = "https://github.com/kaushalmodi/"
relme = true
[[Params.social]]
name = "Gitlab"
link = "https://gitlab.com/users/kaushalmodi/projects"
My own snippet reminded me that you do not need to use site.Param
.. just .Param
would also work. Hugo, in that case, first checks for that param in the Page scope, and if nothing is found, it checks in .Site.
Thank you so much, still learning Go and Hugo at the same time ...
I have merged this manually, and then refactored it a bit: https://github.com/kaushalmodi/hugo-atom-feed/commit/66355e991c075d1f39a1bb7bc9b2b166b4e52db2
Look into resources feature of Hugo; it's awesome!
Instead of have
feedicon
andfeedlogo
scattered in the site Params, it would be nice to have afeed
map. Can you please refactor this for that?Then I can pull in feedsections, limit, etc into that feed map.