Move posts list and tags page files into the src root

This commit is contained in:
Neil Brommer 2023-07-13 09:49:59 -07:00
parent 018f0fd371
commit f14e57fd81
3 changed files with 26 additions and 1 deletions

View file

@ -14,7 +14,7 @@
}
},
"environment" : {
"BUILD_DRAFTS" : "true"
"BUILD_DRAFTS" : "false"
},
"openLogOnRun" : "fail",
"persistent" : true

11
src/posts.njk Normal file
View file

@ -0,0 +1,11 @@
---
title: Posts
layout: layouts/layout.njk
eleventyNavigation:
key: Posts
icon: edit-2
order: 1
---
{% set postsList = collections.posts | filterDrafts | IsNotPage(page.url) %}
{% include "posts-list.njk" %}

14
src/tags.njk Normal file
View file

@ -0,0 +1,14 @@
---
layout: layouts/layout.njk
pagination:
data: collections
size: 1
alias: tag
filter: [ all, post, posts, MainPage ]
eleventyComputed:
title: Posts Tagged “{{ tag }}”
permalink: /posts/tags/{{ tag | slugify }}
---
{% set postsList = collections[tag] %}
{% include "posts-list.njk" %}