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: "#"
|
||||
}),
|
||||
level: [1,2,3,4],
|
||||
slugify: eleventyConfig.getFilter("slug")
|
||||
slugify: eleventyConfig.getFilter("slugify")
|
||||
});
|
||||
eleventyConfig.setLibrary("md", markdownLibrary);
|
||||
|
||||
|
@ -6,7 +6,7 @@ templateClass: tmpl-post
|
||||
|
||||
<time datetime="{{ page.date | htmlDateString }}">{{ page.date | readableDate }}</time>
|
||||
{%- 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>
|
||||
{%- 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>
|
||||
<time class="postlist-date" datetime="{{ post.date | htmlDateString }}">{{ post.date | readableDate }}</time>
|
||||
{% 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>
|
||||
{% endfor %}
|
||||
</li>
|
||||
|
@ -5,6 +5,6 @@ layout: layouts/home.njk
|
||||
<h1>Tags</h1>
|
||||
|
||||
{% 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>
|
||||
{% endfor %}
|
||||
|
Loading…
Reference in New Issue
Block a user