The documentation on Taxonomies begins with a short example clarifying the terminology. It uses the taxonomy Actor
and a term Bruce Willis
.
That would mean, to me, that I could find all pages referring to Bruce Willis
like so:
{{$actor := "Bruce Willis"}}
{{$pages := index .Site.Taxonomies.actor $actor}}
(the second line according to Taxonomy variables | Hugo. )
I didn’t try it with actors and Bruce Willis, but with authors. And there, passing the original name of the author to the index
method/function above returns an empty map. Which is obvious if I look at the output of printf "%v" .Site.Taxonomies.author
:
terms map[
asfa-wossen-asserate:[WeightedPage(0,"Der letzte Kaiser von Afrika")]
david-diop:[WeightedPage(0,"Nachts ist unser Blut schwarz")]
günter-giesenfeld:[WeightedPage(0,"Land der Reisfelder")]
ismail-kadare:[WeightedPage(0,"Chronik in Stein")
…]]
(reformatted for legibility) Apparently, all terms are “anchorized” before they are entered in Hugo’s internal data structures.
Did I overlook the documentation mentioning that? And how/why is the example Actor/Bruce Willis
supposed to work with the index .Site.Taxonomies.actor
code?
I’m not saying that the behavior is wrong. But I think would be helpful to make cristal-clear that terms are not used “as such” by Hugo but only after “anchorizing” them. And amending the parts of the documentation referring to terms etc.
Or is that perhaps a config setting that can switch off anchorization of terms?