ekynoxe / JekyllCategoriesTag

A Plugin that registers a liquid tag {% categories %} so you can show a list of all categories your posts have in their YAML front matter
MIT License
1 stars 0 forks source link

slugify categories? #1

Open sherwinmartin opened 9 years ago

sherwinmartin commented 9 years ago

thanks for the great plugin. i was wondering if there's a way to slugify the categories. i have categories that are more than 1 word, although it works as is, i'd like it to be more seo friendly as well as follow web standards. thanks again.

ekynoxe commented 9 years ago

Good catch. This is actually probably a bug, as, as you say, it should strip special characters and replace spaces by dashes, or something like this. I'll look into it.

ekynoxe commented 9 years ago

@w1n78 I've updated my other plugin for this, the category pages generator at https://github.com/ekynoxe/JekyllCategoryPagesGenerator but I realise now that this plugin creating a tag to generate a list of categories will need more work to make it really useful. I didn't realise until now that Jekyll generates category pages regardless, which aren't usable at all while slugifying the category links.

I think I'll have to see if I can merge those two plugins, or find another way to interact with the way Jekyll generate the category directories.

ekynoxe commented 9 years ago

@w1n78 Am i right thinking you commented on the wrong project? :) Our initial exchange on Twitter talked about the CategoryPagesGenerator.

sherwinmartin commented 9 years ago

oh wow just realized that. sorry and thanks for the update.