-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a "richer" taxonomy configuration #5520
Comments
If the key/value pairs allowed is not limited, this would also be a cleaner way of adding Front Matter to taxonomies (without having to create a
Why |
Hm... I like the above A LOT. It would also eliminate the need to replicate a taxonomy URL as a folder PATH so that we can insert meta data to the list page (exactly as @regisphilibert said above) @bep I am 100% in favor of what you propose here. |
It's not a URL. It's used to construct the URLs and the filepaths (news/categories/index.html etc.), but it does not represent "something complete". This is not related to templates/layouts (not now, anyway). |
I suppose this will also influence the filepaths and URLs of its terms: Also, let's say the user needs to have a bundle or some Front Matter outside of their config file.
Or under the
I'm asking a lot about this |
Because this is a "new thing". We could call it ... |
Ok I understand. As a user, for me the right side of the taxonomy config was just the plural. I never thought passed that. |
I guess the word "plural" is used in the documentation, which I think is fairly confusing. But I guess it creates a convention (categories, tags). We currently only use the "plural" string (that is used in both front matter and as a path element for taxonomies list and terms). |
I like where you're headed here. One comment:
The |
I notice that we do use |
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help. |
Has there been any more thinking about this? This would really help sites that provide a lot of different content types |
See #5513 -- I will fix that issue so it works as described there, but looking at that issue I realize that many taxonomy related workarounds (and also limitations on what we can do) is rooted in the litle bit to limited configuration options.
In the above issue, @randallmlough was creative and created a taxonomy configuration like the one below:
I have made the above a little simpler to wrap my head around it.
The term in the source code used about a taxonomy configuration definition is that the key (
news-tag
is thesingular
form and the value isplural
. Theplural
is what you define in front matter and that is used to construct the taxonomy URLs (e.g.news/categories/index.html
).The above works nicely, but you get a tight coupling between content and taxonomy URLs and possibly miss out on other features that is now hard to implement.
I suggest that we as an alternative to the
string
plural allows a more "complex object":The above is quickly jotted down, but the thought is that it is the
name
that defines the front matter key (note that this will default topath
which is the same asplural
in the "old" way).This would also make the content less coupled to the URL config:
/cc @regisphilibert @kaushalmodi @digitalcraftsman @onedrawingperday and gang
The text was updated successfully, but these errors were encountered: