joeroe / risotto

A minimalist, responsive hugo theme inspired by terminal ricing aesthetics.
https://risotto.joeroe.io
MIT License
393 stars 109 forks source link

Add metadata (categories, tags, etc.) to content pages (see #79) #83

Open shabby-goddess opened 2 months ago

shabby-goddess commented 2 months ago

Problem: tags, categories, and arbitrary taxonomies are not linked on content pages (#79).

Solution: a metadata partial that lists all taxonomies and terms for any given content page. Works with default and user-defined taxonomies.

It's pretty simple:

  1. the first range loop cycles through taxonomies
  2. the with statement resets the context to each taxonomy map
  3. the second range loop renders each term of the taxonomy

Hopefully this will allow for more flexible, user-defined organizational schema going forward. Cheers!