kaiiiz / hugo-theme-monochrome

Monochrome is a fast, clean and responsive hugo theme
https://kaiiiz.github.io/hugo-theme-monochrome/
MIT License
182 stars 52 forks source link

Bookcases and taxonomies #31

Open Ran-n opened 2 years ago

Ran-n commented 2 years ago

Im using the bookcase layout for the taxonomies pages and i would like the option to make it so the title of each bookcase also reflects the number of elements in each option of the taxonomy (as it happens in the terms-cloud).

kaiiiz commented 2 years ago

It's hard to implement such a feature since hugo doesn't provide a function to retrieve the number of pages under the given section (the most relevant option is using len over where .Site.RegularPages "Section" "==" ..., but it doesn't support nested section), so a hand-crafted recursion template should be used to get the nested sections post count.

It's a feature with a relatively low priority as it's a rare case to treat the Bookcase layout as a form of taxonomy page.