1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 05:41:31 +00:00

Allow special characters in categories and tags

This commit is contained in:
Jatin Sanghvi
2019-12-28 00:58:02 -08:00
parent ccbc047e60
commit a819ac95eb
4 changed files with 7 additions and 7 deletions

View File

@@ -20,7 +20,7 @@ layout: default
</span>
{% if page.categories.size > 0 %}on{% endif %}
{% for category in page.categories %}
<a href='{{ site.baseurl }}/categories/{{ category | replace: ' ', '-' | downcase }}/'>{{ category }}</a>
<a href='{{ site.baseurl }}/categories/{{ category | replace: ' ', '-' | downcase | url_encode }}/'>{{ category }}</a>
{%- unless forloop.last -%}, {%- endunless -%}
{% endfor %}
</div>
@@ -62,7 +62,7 @@ layout: default
{% if page.tags.size > 0 %}
<div class="mb-4">
{% for tag in page.tags %}
<a href="{{ site.baseurl }}/tags/{{ tag | replace: ' ', '-' | downcase }}/"
<a href="{{ site.baseurl }}/tags/{{ tag | replace: ' ', '-' | downcase | url_encode }}/"
class="post-tag no-text-decoration" >
{{- tag -}}
</a>