themefisher / airspace-hugo

Airspace Hugo theme for multipurpose use, like Portfolio, Blog, Business.
https://gethugothemes.com/products/airspace/?utm_source=airspace_github&utm_medium=referral&utm_campaign=github_theme_about
MIT License
354 stars 509 forks source link

Empty spaces in tags issue #194

Closed jacob-emery closed 3 years ago

jacob-emery commented 3 years ago

There is a problem when selecting tags that include empty spaces (the issue isn't present if you click on a big tag, only on the small ones in the list of articles or on top of the opened article).

To fix the issue open layouts/_default/single.html and layouts/_default/list.html and replace .lower with .urlize. I.e. replace

<li><i class="ion-pricetags"></i>
  {{ range $index, $elements:= .Params.tags }}{{ if ne $index 0 }}, {{ end }}<a href="{{ `tags/` | relLangURL }}{{. | lower}}">{{ . }}</a>{{ end }}
</li>

with

<li><i class="ion-pricetags"></i>
  {{ range $index, $elements:= .Params.tags }}{{ if ne $index 0 }}, {{ end }}<a href="{{ `tags/` | relLangURL }}{{. | urlize}}">{{ . }}</a>{{ end }}
</li>
salim-b commented 3 years ago

Thanks for reporting this, you're absolutely right, these are bugs. #195 will fix this.