sbellbooks / firstsite

0 stars 0 forks source link

Generalize books:series map code so it works from anywhere in the site --> turn it into a partial that returns the map #51

Closed sbellbooks closed 4 years ago

sbellbooks commented 4 years ago

https://gohugo.io/templates/partials/#returning-a-value-from-a-partial

sbellbooks commented 4 years ago

Because we ended up using Hugo native constructs (GroupbyParam and where) instead of a map to achieve the effect, there's not enough code to warrant a partial. But I did generalize it so it's reusable anywhere on the site. If I end up reusing it enough I might turn it into a partial.