Fix pound symbol not displaying properly for post categories and tags
Fixes #2156
This commit is contained in:
parent
cb4acd9423
commit
26c1989bf6
2 changed files with 4 additions and 4 deletions
|
@ -10,14 +10,14 @@
|
||||||
<!-- Sort alphabetically regardless of case e.g. a B c d E -->
|
<!-- Sort alphabetically regardless of case e.g. a B c d E -->
|
||||||
<!-- modified from http://www.codeofclimber.ru/2015/sorting-site-tags-in-jekyll/ -->
|
<!-- modified from http://www.codeofclimber.ru/2015/sorting-site-tags-in-jekyll/ -->
|
||||||
{% endcomment %}
|
{% endcomment %}
|
||||||
{% capture page_categories %}{% for category in page.categories %}{{ category | downcase }}#{{ category }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %}
|
{% capture page_categories %}{% for category in page.categories %}{{ category | downcase }}|{{ category }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %}
|
||||||
{% assign category_hashes = page_categories | split: ',' | sort %}
|
{% assign category_hashes = page_categories | split: ',' | sort %}
|
||||||
|
|
||||||
<p class="page__taxonomy">
|
<p class="page__taxonomy">
|
||||||
<strong><i class="fas fa-fw fa-folder-open" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].categories_label | default: "Categories:" }} </strong>
|
<strong><i class="fas fa-fw fa-folder-open" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].categories_label | default: "Categories:" }} </strong>
|
||||||
<span itemprop="keywords">
|
<span itemprop="keywords">
|
||||||
{% for hash in category_hashes %}
|
{% for hash in category_hashes %}
|
||||||
{% assign keyValue = hash | split: '#' %}
|
{% assign keyValue = hash | split: '|' %}
|
||||||
{% capture category_word %}{{ keyValue[1] | strip_newlines }}{% endcapture %}
|
{% capture category_word %}{{ keyValue[1] | strip_newlines }}{% endcapture %}
|
||||||
<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 %}
|
<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 %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -10,14 +10,14 @@
|
||||||
<!-- Sort alphabetically regardless of case e.g. a B c d E -->
|
<!-- Sort alphabetically regardless of case e.g. a B c d E -->
|
||||||
<!-- modified from http://www.codeofclimber.ru/2015/sorting-site-tags-in-jekyll/ -->
|
<!-- modified from http://www.codeofclimber.ru/2015/sorting-site-tags-in-jekyll/ -->
|
||||||
{% endcomment %}
|
{% endcomment %}
|
||||||
{% capture page_tags %}{% for tag in page.tags %}{{ tag | downcase }}#{{ tag }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %}
|
{% capture page_tags %}{% for tag in page.tags %}{{ tag | downcase }}|{{ tag }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %}
|
||||||
{% assign tag_hashes = page_tags | split: ',' | sort %}
|
{% assign tag_hashes = page_tags | split: ',' | sort %}
|
||||||
|
|
||||||
<p class="page__taxonomy">
|
<p class="page__taxonomy">
|
||||||
<strong><i class="fas fa-fw fa-tags" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].tags_label | default: "Tags:" }} </strong>
|
<strong><i class="fas fa-fw fa-tags" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].tags_label | default: "Tags:" }} </strong>
|
||||||
<span itemprop="keywords">
|
<span itemprop="keywords">
|
||||||
{% for hash in tag_hashes %}
|
{% for hash in tag_hashes %}
|
||||||
{% assign keyValue = hash | split: '#' %}
|
{% assign keyValue = hash | split: '|' %}
|
||||||
{% capture tag_word %}{{ keyValue[1] | strip_newlines }}{% endcapture %}
|
{% capture tag_word %}{{ keyValue[1] | strip_newlines }}{% endcapture %}
|
||||||
<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 %}
|
<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 %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Loading…
Reference in a new issue