-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Description
This have been discussed before and I thought it wasn't important enough to warrant a potential breaking change.
After the Page.GetTerms
discussion we had I have looked at the taxonomy documentation, and it's murky and hard to understand, and I think this is a little bit because we don't have the terms in precise order.
I have looked at this more closely, and I think we can do this without too much noise. The .Page.Kind
is mostly an internal "thing", but leaks out into the template/config in some places -- but not so much for the taxonomies as, say, section and regular pages. The most important part is the template selection, and there we should be safe.
So, I suggest we fix this before it's too late.
Currently we have taxonomyTerm
(where I guess it was meant that it's a list of terms) and then each term is a taxonomy
.
I suggest we introduce a new term and use the terms used for this in the documentation:
If you need to display custom metadata for each taxonomy term, you will need to create a page for that term at /content/<TAXONOMY>/<TERM>/_index.md and add your metadata in its
So:
taxonomyTerm
=>taxonomy
(holds a list of terms)taxonomy
=>term
I will try to make this as backwards compatible as possible (ref. disableKinds etc.), and that is a little easier when we're not just swapping them (and I kind of like the shorter term
).
For the template logic I see no problems.
case "taxonomy":
if d.Section != "" {
b.addLayoutVariations(d.Section)
}
b.addKind()
b.addSectionType()
case "taxonomyTerm":
if d.Section != "" {
b.addLayoutVariations(d.Section + ".terms")
}
b.addTypeVariations("taxonomy")
b.addSectionType()
b.addLayoutVariations("terms")
What do you say @regisphilibert @onedrawingperday @digitalcraftsman @kaushalmodi and gang? Go for it?