Fix underscores in the links of tags/categories (#199)
This commit is contained in:
parent
289ce1263d
commit
b8ee5a7b0c
6 changed files with 15 additions and 15 deletions
|
@ -11,9 +11,9 @@
|
|||
<div class="access">
|
||||
|
||||
{% include update-list.html %}
|
||||
|
||||
|
||||
{% if update_list.size > 0 %}
|
||||
|
||||
|
||||
<div id="access-lastmod" class="post">
|
||||
<span>{{- site.data.label.panel.lastmod -}}</span>
|
||||
<ul class="post-content pl-0 pb-1 ml-1 mt-2">
|
||||
|
@ -27,7 +27,7 @@
|
|||
|
||||
</ul>
|
||||
</div> <!-- #access-lastmod -->
|
||||
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% include trending-tags.html %}
|
||||
|
@ -36,10 +36,10 @@
|
|||
<div id="access-tags">
|
||||
<span>{{- site.data.label.panel.trending_tags -}}</span>
|
||||
<div class="d-flex flex-wrap mt-3 mb-1 mr-3">
|
||||
|
||||
{% for tag in trending_tags %}
|
||||
{% capture url %}/tags/{{ tag | downcase | url_encode }}/{% endcapture %}
|
||||
<a class="post-tag" href="{{ url | relative_url }}">{{ tag | replace: '-', ' ' }}</a>
|
||||
|
||||
{% for tag_name in trending_tags %}
|
||||
{% assign url = tag_name | slugify | url_encode | prepend: "/tags/" | append: "/" %}
|
||||
<a class="post-tag" href="{{ url | relative_url }}">{{ tag_name }}</a>
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
|
|
|
@ -13,11 +13,11 @@
|
|||
{% include trending-tags.html %}
|
||||
|
||||
{% for tag in trending_tags %}
|
||||
{% capture url %}/tags/{{ tag | downcase | url_encode }}/{% endcapture %}
|
||||
{% capture url %}/tags/{{ tag | slugify | url_encode }}/{% endcapture %}
|
||||
<a class="post-tag" href="{{ url | relative_url }}">{{ tag | replace: '-', ' ' }}</a>
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
<div id="search-results" class="d-flex flex-wrap justify-content-center text-muted mt-3"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
{% assign size = tag | last | size %}
|
||||
{% assign size_list = size_list | push: size %}
|
||||
|
||||
{% assign tag_str = tag | first | replace: " ", "-" | append: "::" | append: size %}
|
||||
{% assign tag_str = tag | first | append: "::" | append: size %}
|
||||
{% assign tag_list = tag_list | push: tag_str %}
|
||||
{% endfor %}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ layout: page
|
|||
{% else %}
|
||||
<i class="far fa-folder fa-fw"></i>
|
||||
{% endif %}
|
||||
<a href="{{ site.baseurl }}/categories/{{ category_name | replace: ' ', '-' | downcase | url_encode }}/"
|
||||
<a href="{{ site.baseurl }}/categories/{{ category_name | slugify | url_encode }}/"
|
||||
class="ml-1 mr-2">
|
||||
{{ category_name }}
|
||||
</a>
|
||||
|
@ -85,7 +85,7 @@ layout: page
|
|||
{% for sub_category in sub_categories %}
|
||||
<li class="list-group-item">
|
||||
<i class="far fa-folder fa-fw"></i>
|
||||
<a href="{{ site.baseurl }}/categories/{{ sub_category | replace: ' ', '-' | downcase | url_encode }}/"
|
||||
<a href="{{ site.baseurl }}/categories/{{ sub_category | slugify | url_encode }}/"
|
||||
class="ml-1 mr-2">{{ sub_category }}</a>
|
||||
{% assign posts_size = site.categories[sub_category] | size %}
|
||||
<span class="text-muted small font-weight-light">{{ posts_size }}
|
||||
|
|
|
@ -73,7 +73,7 @@ layout: default
|
|||
<div class="post-meta mb-3">
|
||||
<i class="far fa-folder-open fa-fw mr-1"></i>
|
||||
{% for category in page.categories %}
|
||||
<a href='{{ site.baseurl }}/categories/{{ category | replace: ' ', '-' | downcase | url_encode }}/'>{{ category }}</a>
|
||||
<a href='{{ site.baseurl }}/categories/{{ category | slugify | url_encode }}/'>{{ category }}</a>
|
||||
{%- unless forloop.last -%}, {%- endunless -%}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
@ -84,7 +84,7 @@ layout: default
|
|||
<div class="post-tags">
|
||||
<i class="fa fa-tags fa-fw mr-1"></i>
|
||||
{% for tag in page.tags %}
|
||||
<a href="{{ site.baseurl }}/tags/{{ tag | replace: ' ', '-' | downcase | url_encode }}/"
|
||||
<a href="{{ site.baseurl }}/tags/{{ tag | slugify | url_encode }}/"
|
||||
class="post-tag no-text-decoration" >
|
||||
{{- tag -}}
|
||||
</a>
|
||||
|
|
|
@ -19,7 +19,7 @@ layout: page
|
|||
|
||||
{% for t in sorted_tags %}
|
||||
<div>
|
||||
<a class="tag" href="{{ site.baseurl }}/tags/{{ t | replace: ' ', '-' | downcase | url_encode }}/">{{ t }}<span class="text-muted">{{ site.tags[t].size }}</span></a>
|
||||
<a class="tag" href="{{ site.baseurl }}/tags/{{ t | slugify | url_encode }}/">{{ t }}<span class="text-muted">{{ site.tags[t].size }}</span></a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
|
|
Loading…
Reference in a new issue