Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9a47c84

Browse files
committedMay 21, 2019
Fix pound symbol not displaying properly for post categories and tags
Fixes mmistakes#2156
1 parent ae3472e commit 9a47c84

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

‎_includes/category-list.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
<!-- Sort alphabetically regardless of case e.g. a B c d E -->
1111
<!-- modified from http://www.codeofclimber.ru/2015/sorting-site-tags-in-jekyll/ -->
1212
{% endcomment %}
13-
{% capture page_categories %}{% for category in page.categories %}{{ category | downcase }}#{{ category }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %}
13+
{% capture page_categories %}{% for category in page.categories %}{{ category | downcase }}|{{ category }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %}
1414
{% assign category_hashes = page_categories | split: ',' | sort %}
1515

1616
<p class="page__taxonomy">
1717
<strong><i class="fas fa-fw fa-folder-open" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].categories_label | default: "Categories:" }} </strong>
1818
<span itemprop="keywords">
1919
{% for hash in category_hashes %}
20-
{% assign keyValue = hash | split: '#' %}
20+
{% assign keyValue = hash | split: '|' %}
2121
{% capture category_word %}{{ keyValue[1] | strip_newlines }}{% endcapture %}
2222
<a href="{{ category_word | slugify | prepend: path_type | prepend: site.category_archive.path | relative_url }}" class="page__taxonomy-item" rel="tag">{{ category_word }}</a>{% unless forloop.last %}<span class="sep">, </span>{% endunless %}
2323
{% endfor %}

‎_includes/tag-list.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
<!-- Sort alphabetically regardless of case e.g. a B c d E -->
1111
<!-- modified from http://www.codeofclimber.ru/2015/sorting-site-tags-in-jekyll/ -->
1212
{% endcomment %}
13-
{% capture page_tags %}{% for tag in page.tags %}{{ tag | downcase }}#{{ tag }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %}
13+
{% capture page_tags %}{% for tag in page.tags %}{{ tag | downcase }}|{{ tag }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %}
1414
{% assign tag_hashes = page_tags | split: ',' | sort %}
1515

1616
<p class="page__taxonomy">
1717
<strong><i class="fas fa-fw fa-tags" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].tags_label | default: "Tags:" }} </strong>
1818
<span itemprop="keywords">
1919
{% for hash in tag_hashes %}
20-
{% assign keyValue = hash | split: '#' %}
20+
{% assign keyValue = hash | split: '|' %}
2121
{% capture tag_word %}{{ keyValue[1] | strip_newlines }}{% endcapture %}
2222
<a href="{{ tag_word | slugify | prepend: path_type | prepend: site.tag_archive.path | relative_url }}" class="page__taxonomy-item" rel="tag">{{ tag_word }}</a>{% unless forloop.last %}<span class="sep">, </span>{% endunless %}
2323
{% endfor %}

0 commit comments

Comments
 (0)
Please sign in to comment.