Ideally I could configure it so xepsupport and xeppartial are “mapped” to the xeps taxonomy. There are few other examples where this would be handy for me.
@Mikhail, is that similar enough to what you are talking about?
What you are offering is working now, if you manually add xeps: in each article. I suggest that the list of xerp: be automatically formed if the xerp: is designated as the parent in the hierarchy in the config.yaml
I have not used wordpress for a long time, but people wrote here that taxanomies there support the hierarchy. I did not invent this myself, this logic of the taxonomy is already used in cms.
I am a WordPress specialist, so I can speak to that. WordPress supports two kinds of taxonomies, and one has a hierarchy, but they are based on terms, not the taxonomies themselves.
Each term can have a single parent term. So in your example, you want John Smith to be a sub-term of authors, itself a term in this scenario.
person (taxonomy) > author (term), > John Smith (term)
Is that what you want?
Hugo supports taxonomies the way WordPress does by default, which is a “flat” taxonomy, meaning all terms have the same relationship with each other and the taxonomy.
person (taxnomy) > John Smith (term)
Yeah… your subject was accurate. A “multi-level taxonomy”, or hierarchal taxonomy.
How would you handle setting sub-terms in TOML or JSON?
For me, the main thing is that the term from a subsidiary taxonomy is automatically included in the parent taxonomy. Whether it will be reflected in the URL for me is not important, but ideally it is desirable to give the user the opportunity to choose: display the hierarchy in the URL or not.
taxonomies:
category: "categories"
person: "persons"
annotator: "persons/annotators" -- hierarchy in the URL as option.
author: "authors"
recipient: "recipients"
I am not an expert in formats, but I don’t think TOML and YAML nest values the same way. Instead of nesting taxonomies in front matter, would it be easier to config one taxonomy as a nested inside another taxonomy, from the config? Presuming it is possible, of course!
Terms with slashes have solved my issue with a three level geo-taxonomy (country/region/city). Please visit example-page and click on one of the regions to see it in action.
This works due to some extra taxonomy/templates.html, which extract the right levels.
It took some days - well weeks exactly - to make this work. And today I sometimes wonder, what happened…
Bottom line is, that the country/region/city feature includes a substancial number of template- and sub-template files. And even more of the same in order to translate special scandinavian letters from urls. This forum is not the right place for al this stuff.
But the main idea is straight forward. You need separate taxonomy/tempates for each route/level - ex.:
If you expand on the current Hugo model, you will get an implied hierarchy from the URLs, but not a navigational tree structure. You will get a terms list on each level, but will get the lead nodes only in the .Data.Pages. But that is probably good enough (at least an improvement of what we have).
I understood that using the union function in the template, I can create a common list of terms for the three taxonomies. But the terms URL will lead to different folders. In principle, Hugo allows me to do what I want, but not quite like in cms.
A page won’t be created for /persons/authors/alice, but you can still use implied hierarchy to range over a list of content where Alice was an author. Is that correct?
Also, sorry if this is stale; a cursory issue search didn’t find anything about this.
Similar to what @JLKM did, I also got a geography-based hierarchy working (two levels, country and city), although I did it with only one taxonomy called “locations”:
You posted the same answer in another old topic earlier today.
The forum software displays a warning before bumping an old topic.
Please do not ignore it again. We discourage bumping old topics of several years ago.
Hugo is in constant development and several features may have changed in the meantime.
Also people who participated in those discussions may no longer be around.
Furthermore cross-posting in several topics is not allowed in this forum.