pirati-web / jekyll-theme-pirati

Web desing of Czech Pirate Party
6 stars 17 forks source link

Tag list layout doesn't work well with tags that contain spaces #18

Open xaralis opened 6 years ago

xaralis commented 6 years ago

When you have article tags with spaces (such as 'územní plán'), it's not parsed properly in taglist layout. Which then breaks deployment when htmlproofer does it's thing.

janadamec1 commented 5 years ago

I tried to deal with it at praha12 website. There is a copy of taglist.html layout, that solves this. See my website and source code.

The main problem is, that article authors use different ways to separate tags. The original taglist layout separates them using space, which leads authors to use hyphen to concatenate multi-word tags (and it looks horrible).

So what's the solution? Provide multiple ways to implement taglist, and switch between them using some variable in _config.yml?

xaralis commented 5 years ago

@janadamec1 The best solution would be to switch to array-based tags. Unfortunately, this is backwards incompatible and would require significant effort when upgrading.

Therefore, I'd like to introduce two-step approach. Let's check if it is array or string and behave accordingly (this is possible, see https://stackoverflow.com/a/41646032/303184). Once ready, let's put string-based solution into deprecation mode and warn users it's gonna be removed in next major release.