gohugoio / hugo

The world’s fastest framework for building websites.
https://gohugo.io
Apache License 2.0
74.92k stars 7.47k forks source link

Allow for richer metadata in taxonomy entries #6174

Open bep opened 5 years ago

bep commented 5 years ago

I'm just making notes of this after looking at it ... I'm not sure how great an idea it is.

We currently can do something ala:

title: "Hugo Rocks!"
categories: 
- "cool"
- "funny"
categories_weight: 32

So, we currently have a weight that has an effect of the order this page in the categories listings.

Thinking about these taxonomies as aggregated views, we may want to have a more fine grained way of adding/overriding metadata. Something ala:

title: "Hugo Rocks!"
categories: 
- cool
- funny:
  - title: "Hugo Rocks the funny boat!"
  - weight: 34
kaushalmodi commented 5 years ago

I think this will complicate logic and also maintainability of weights from the user side.

The weight in a page front-matter tells the weight of that page.

Now when you add another weight inside a taxonomy in that front-matter:

So the question is about the practicality of maintaining these weights, titles, etc. by the user (and the feature by the maintainer). I'm just curious about the real use case.

HenrySkup commented 5 years ago

I think that this sounds reasonable -- if someone is fiddling around with weights at any level, they are intentionally wanting to get into the nitty-gritties. I could also see how a page may be "more" of one tag vs another tag (though this might be a relative measure against eachother rather than against other pages with a particular tag).

bep commented 5 years ago

I'm already forgetting why I created this issue. But I think there is some unexplored potential in the whole taxonomy land.