UtkarshVerma / hugo-dream-plus

:rainbow: An upgraded version of the Hugo "Dream" theme with tons of new features.
http://dream-plus-posts.netlify.com
MIT License
68 stars 66 forks source link

Add Support For "Series" (/Custom?) Taxonomy #54

Closed ShaunaGordon closed 5 years ago

ShaunaGordon commented 5 years ago

Is your feature request related to a problem? Please describe.
The theme currently only supports the default taxonomies, which probably works for most people, but it'd be nice if at least a "series" custom taxonomy could be supported.

Describe the solution you'd like
I know of two ways this could work off the top of my head:

  1. (Easy, but rigid) "Series" is just plain added as a taxonomy and if it's used, then it appears in the header, similar to how Categories and Tags already work. The sidebar could then also include the available series in a humanized list.
  2. (More involved, but more scaling potential) Hooks are added to allow for taxonomies to be configured in settings, probably with a dictionary that links the taxonomy to an icon to use in the header. There could also be an option to include the taxonomy in the sidebar, appearing similar to option 1.

Describe alternatives you've considered
The Categories taxonomy could technically be used to fill this role, but (to me at least) this seems kind of stretching the purpose of categories.

Additional context
The list page, itself, already works okay, albeit in need of a little tweaking to reflect arbitrary taxonomies.

image

See for reference: Whiteplain theme's list template (its documented setup includes the "series" taxonomy).

UtkarshVerma commented 5 years ago

@ShaunaGordon Hey, thanks for posting this issue. Seems to be a good suggestion. But sadly, as much as I'd like to pick up this issue, I can't, due to huge time constraints. I'll happily pick it up after a couple of weeks when I'll be free so as to do the job nicely(adding this will surely need work). Hoping you don't mind. Also, please further elaborate what you meant by this:

The list page, itself, already works okay, albeit in need of a little tweaking to reflect arbitrary taxonomies.

This should serve as a future note.

ShaunaGordon commented 5 years ago

Also, please further elaborate what you meant by this:

The list page, itself, already works okay, albeit in need of a little tweaking to reflect arbitrary taxonomies.

If you look closely at the screenshot, you'll see that it's on the /series page, but the header reads All Tags. The list itself looks okay and is picking up my series properly (albeit not in a "humanized" fashion, with title caps and spaces where the dashes are), and from what I recall/understand from reading the code, I think the template is just currently configured to default to assuming tags, instead of being more generic.

But sadly, as much as I'd like to pick up this issue, I can't, due to huge time constraints. I'll happily pick it up after a couple of weeks when I'll be free so as to do the job nicely(adding this will surely need work). Hoping you don't mind.

No worries! ^_^ When people are nice enough to offer awesome stuff for free, I don't expect them to drop everything to support it, especially for enhancements, and especially over the holiday season. (And as you can see, I had time issues, too, since I'm only just now able to respond. 😆 ) If I need something faster, I can always do a PR. 😉

UtkarshVerma commented 5 years ago

@ShaunaGordon I have generalized taxonomy support in the theme. Now you should be able to use custom taxonomies properly. Also, regarding your suggestions, for making custom taxonomies appear in the sidebar and nav bar, they seem impractical to me for the following reasons:

These are the concerns which I have currently. More suggestions are still welcome since they make this theme more and more robust by the day.