Create tags and blog pages
This commit is contained in:
parent
ef7078f3b9
commit
31b2ac802f
8
src/pages/blog.md
Normal file
8
src/pages/blog.md
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
title: Blog
|
||||
description: 'All blog posts can be found here'
|
||||
layout: blog
|
||||
permalink: /blog/index.html
|
||||
---
|
||||
|
||||
Here, you can find every post of this blog
|
||||
17
src/pages/tag.md
Normal file
17
src/pages/tag.md
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
eleventyComputed:
|
||||
title: "Posts tagged “{{ tag }}”"
|
||||
permalink: '/tags/{{ tag | slug }}/'
|
||||
pagination:
|
||||
data: collections
|
||||
size: 1
|
||||
alias: tag
|
||||
layout: base
|
||||
---
|
||||
|
||||
# {{ title }}
|
||||
|
||||
{% set postslist = collections[ tag ] %}
|
||||
{% include "partials/posts.njk" %}
|
||||
|
||||
View all [tags](/tags/).
|
||||
16
src/pages/tags.md
Normal file
16
src/pages/tags.md
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
title: Tags
|
||||
permalink: /tags/
|
||||
layout: base
|
||||
---
|
||||
|
||||
# {{ title }}
|
||||
|
||||
<ul>
|
||||
|
||||
{% for tag in collections.all | getAllTags %}
|
||||
{% set tagUrl %}/tags/{{ tag | slugify }}/{% endset %} <li>
|
||||
<a href="{{ tagUrl }}">{{ tag }}</a>
|
||||
</li> {% endfor %}
|
||||
|
||||
</ul>
|
||||
Loading…
Reference in a new issue