totocaster / metalsmith-tags

A metalsmith plugin to create dedicated pages for tags in posts or pages.
49 stars 43 forks source link

Spaces in tags are replaced by - #5

Closed dpobel closed 9 years ago

dpobel commented 10 years ago

Spaces in tags are replaced by a dash. I guess this is done on purpose to easily generate the link to the tag page.

To avoid that, I would suggest to keep the tags intact in the document while building the tags array and to build a global tags list in the Metalsmith metadata referencing the same object as the one created for <path>/<tag>.html. This way, if you use metalsmith-permalinks, in the template you can have access to the corresponding page URL with something like tagsList[tag].path.

Bonus point, this global tags list would also allow to easily create a tag cloud (I'll have to do that in a future project).

Any though on that?

totocaster commented 10 years ago

That's great, feel free to fork and submit pull request on that. I have no time to do it myself at this point.

dpobel commented 10 years ago

(waiting for #7 to be merged to open the corresponding PR, the potential patch is visible in https://github.com/dpobel/metalsmith-tags/commit/7ca8d234f3cc313050239ffb386daf6412d19ee1)

hswolff commented 9 years ago

Hey @dpobel this sounds like a good change!

I addressed #7 and also tackled the metadata issue. Care to apply the other changes in a PR?

hswolff commented 9 years ago

Now resolved! Wahoo!