Skip to content

Commit 218adcb

Browse files
Add folders and set up for 4 'general' groups
This sets up 4 new sections for posts that aren't about a specific service: * Digital prevention services (for posts that cover the whole of DPSP) * Screening * Vaccinations * Personalised prevention No posts have actually been added yet, so the homepage is currently unchanged - but we'll add the links when some posts have been added.
1 parent 998a2e5 commit 218adcb

File tree

9 files changed

+85
-0
lines changed

9 files changed

+85
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
layout: collection
3+
title: Digital prevention services
4+
description: Work across digital prevention services
5+
pagination:
6+
data: collections.digital-prevention-services
7+
reverse: true
8+
size: 50
9+
permalink: "digital-prevention-services/{% if pagination.pageNumber > 0 %}page/{{ pagination.pageNumber + 1 }}{% endif %}/"
10+
---
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"eleventyNavigation": {
3+
"parent": "Digital prevention services"
4+
}
5+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
layout: collection
3+
title: Personalised prevention
4+
description: Work that spans services in personalised prevention
5+
area: Personalised prevention
6+
pagination:
7+
data: collections.personalised-prevention
8+
reverse: true
9+
size: 50
10+
permalink: "personalised-prevention/{% if pagination.pageNumber > 0 %}page/{{ pagination.pageNumber + 1 }}{% endif %}/"
11+
---
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"eleventyNavigation": {
3+
"parent": "Personalised prevention"
4+
}
5+
}

app/posts/screening.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
layout: collection
3+
title: Screening
4+
description: Work that spans services in screening
5+
area: Screening
6+
pagination:
7+
data: collections.screening
8+
reverse: true
9+
size: 50
10+
permalink: "screening/{% if pagination.pageNumber > 0 %}page/{{ pagination.pageNumber + 1 }}{% endif %}/"
11+
---

app/posts/screening/screening.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"eleventyNavigation": {
3+
"parent": "Screening"
4+
}
5+
}

app/posts/vaccinations.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
layout: collection
3+
title: Vaccinations
4+
description: Work that spans services in vaccinations
5+
area: Vaccinations
6+
pagination:
7+
data: collections.vaccinations
8+
reverse: true
9+
size: 50
10+
permalink: "vaccinations/{% if pagination.pageNumber > 0 %}page/{{ pagination.pageNumber + 1 }}{% endif %}/"
11+
---
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"eleventyNavigation": {
3+
"parent": "Vaccinations"
4+
}
5+
}

eleventy.config.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,18 @@ module.exports = function (eleventyConfig) {
5757
eleventyConfig.addPassthroughCopy({ './app/images': '.' })
5858
eleventyConfig.addPassthroughCopy('./app/pdfs');
5959

60+
// General category for posts that cover all of digital prevention services
61+
eleventyConfig.addCollection("digital-prevention-services", (collection) => {
62+
return collection.getFilteredByGlob("app/posts/digital-prevention-services/**/*.md")
63+
})
6064

6165
// Screening collections
66+
67+
// General category for posts about screening
68+
eleventyConfig.addCollection("screening", (collection) => {
69+
return collection.getFilteredByGlob("app/posts/screening/**/*.md")
70+
})
71+
6272
eleventyConfig.addCollection("bowel-screening", (collection) => {
6373
return collection.getFilteredByGlob("app/posts/bowel-screening/**/*.md")
6474
})
@@ -88,6 +98,12 @@ module.exports = function (eleventyConfig) {
8898
})
8999

90100
// Vaccination collections
101+
102+
// General category for posts about vaccination services
103+
eleventyConfig.addCollection("vaccinations", (collection) => {
104+
return collection.getFilteredByGlob("app/posts/vaccinations/**/*.md")
105+
})
106+
91107
eleventyConfig.addCollection('book-a-vaccination', collection => {
92108
return collection.getFilteredByGlob('app/posts/book-a-vaccination/**/*.md')
93109
})
@@ -113,6 +129,12 @@ module.exports = function (eleventyConfig) {
113129
})
114130

115131
// Personalised prevention collections
132+
133+
// General category for posts about personalised prevention
134+
eleventyConfig.addCollection("personalised-prevention", (collection) => {
135+
return collection.getFilteredByGlob("app/posts/personalised-prevention/**/*.md")
136+
})
137+
116138
eleventyConfig.addCollection('digital-nhs-health-check', collection => {
117139
return collection.getFilteredByGlob('app/posts/digital-nhs-health-check/**/*.md')
118140
})

0 commit comments

Comments
 (0)