From: Austin Ziegler Date: Sun, 2 Nov 2014 03:44:21 +0000 (-0400) Subject: Fix a bug with taxonomy rendering. X-Git-Tag: v0.13~322 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d467ec0aab08d91eb84b26d6faad6a6fe340761c;p=brevno-suite%2Fhugo Fix a bug with taxonomy rendering. - In `layouts/_default/taxonomy.html`, the `.Data` result does not provide the same information that `layouts/_default/terms.html` does for being able to identify the plural value of the term. - This change adds `.Data.Singular` and `.Data.Plural` to provide similar capabilities. - This *may* be incompatible with templates that check for `{{ if ne $taxonomy "Pages" }}` if the `page.Params` has either the singular or plural values as keys. --- diff --git a/hugolib/site.go b/hugolib/site.go index 4a986d81..a79fa9f8 100644 --- a/hugolib/site.go +++ b/hugolib/site.go @@ -843,6 +843,8 @@ func (s *Site) newTaxonomyNode(t taxRenderInfo) (*Node, string) { n.Date = t.pages[0].Page.Date } n.Data[t.singular] = t.pages + n.Data["Singular"] = t.singular + n.Data["Plural"] = t.plural n.Data["Pages"] = t.pages.Pages() return n, base }