Switch to use 1.0+ slugify filter instead
This commit is contained in:
parent
8cc9cb8996
commit
137e76fb42
@ -72,7 +72,7 @@ module.exports = function(eleventyConfig) {
|
|||||||
symbol: "#"
|
symbol: "#"
|
||||||
}),
|
}),
|
||||||
level: [1,2,3,4],
|
level: [1,2,3,4],
|
||||||
slugify: eleventyConfig.getFilter("slug")
|
slugify: eleventyConfig.getFilter("slugify")
|
||||||
});
|
});
|
||||||
eleventyConfig.setLibrary("md", markdownLibrary);
|
eleventyConfig.setLibrary("md", markdownLibrary);
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ templateClass: tmpl-post
|
|||||||
|
|
||||||
<time datetime="{{ page.date | htmlDateString }}">{{ page.date | readableDate }}</time>
|
<time datetime="{{ page.date | htmlDateString }}">{{ page.date | readableDate }}</time>
|
||||||
{%- for tag in tags | filterTagList %}
|
{%- for tag in tags | filterTagList %}
|
||||||
{%- set tagUrl %}/tags/{{ tag | slug }}/{% endset %}
|
{%- set tagUrl %}/tags/{{ tag | slugify }}/{% endset %}
|
||||||
<a href="{{ tagUrl | url }}" class="post-tag">{{ tag }}</a>
|
<a href="{{ tagUrl | url }}" class="post-tag">{{ tag }}</a>
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<a href="{{ post.url | url }}" class="postlist-link">{% if post.data.title %}{{ post.data.title }}{% else %}<code>{{ post.url }}</code>{% endif %}</a>
|
<a href="{{ post.url | url }}" class="postlist-link">{% if post.data.title %}{{ post.data.title }}{% else %}<code>{{ post.url }}</code>{% endif %}</a>
|
||||||
<time class="postlist-date" datetime="{{ post.date | htmlDateString }}">{{ post.date | readableDate }}</time>
|
<time class="postlist-date" datetime="{{ post.date | htmlDateString }}">{{ post.date | readableDate }}</time>
|
||||||
{% for tag in post.data.tags | filterTagList %}
|
{% for tag in post.data.tags | filterTagList %}
|
||||||
{% set tagUrl %}/tags/{{ tag | slug }}/{% endset %}
|
{% set tagUrl %}/tags/{{ tag | slugify }}/{% endset %}
|
||||||
<a href="{{ tagUrl | url }}" class="post-tag">{{ tag }}</a>
|
<a href="{{ tagUrl | url }}" class="post-tag">{{ tag }}</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</li>
|
</li>
|
||||||
|
@ -5,6 +5,6 @@ layout: layouts/home.njk
|
|||||||
<h1>Tags</h1>
|
<h1>Tags</h1>
|
||||||
|
|
||||||
{% for tag in collections.tagList %}
|
{% for tag in collections.tagList %}
|
||||||
{% set tagUrl %}/tags/{{ tag | slug }}/{% endset %}
|
{% set tagUrl %}/tags/{{ tag | slugify }}/{% endset %}
|
||||||
<a href="{{ tagUrl | url }}" class="post-tag">{{ tag }}</a>
|
<a href="{{ tagUrl | url }}" class="post-tag">{{ tag }}</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
2
tags.njk
2
tags.njk
@ -12,7 +12,7 @@ pagination:
|
|||||||
layout: layouts/home.njk
|
layout: layouts/home.njk
|
||||||
eleventyComputed:
|
eleventyComputed:
|
||||||
title: Tagged “{{ tag }}”
|
title: Tagged “{{ tag }}”
|
||||||
permalink: /tags/{{ tag | slug }}/
|
permalink: /tags/{{ tag | slugify }}/
|
||||||
---
|
---
|
||||||
<h1>Tagged “{{ tag }}”</h1>
|
<h1>Tagged “{{ tag }}”</h1>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user