Skip to content

Commit

Permalink
Remove tags for service collections (#220)
Browse files Browse the repository at this point in the history
This stops the tags appearing on the index pages, and allows us to use tags for navigation.
  • Loading branch information
frankieroberto committed Jun 22, 2023
1 parent ae4ed1e commit 7c9258a
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 5 deletions.
17 changes: 17 additions & 0 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,23 @@ module.exports = function (eleventyConfig) {
}
})

// Collections of posts for each service
eleventyConfig.addCollection('manage-training', collection => {
return collection.getFilteredByGlob('app/posts/manage-training/*.md')
})

eleventyConfig.addCollection('manage-cpd-delivery', collection => {
return collection.getFilteredByGlob('app/posts/manage-cpd-delivery/*.md')
})

eleventyConfig.addCollection('register-for-an-npq', collection => {
return collection.getFilteredByGlob('app/posts/register-for-an-npq/*.md')
})

eleventyConfig.addCollection('support-for-cpd', collection => {
return collection.getFilteredByGlob('app/posts/support-for-cpd/*.md')
})

// Browser Sync
eleventyConfig.setBrowserSyncConfig({
rewriteRules: [{
Expand Down
1 change: 0 additions & 1 deletion app/posts/manage-cpd-delivery/manage-cpd-delivery.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"tags": ["manage-cpd-delivery"],
"eleventyNavigation": {
"parent": "Lead provider, delivery partner, and appropriate body services"
}
Expand Down
1 change: 0 additions & 1 deletion app/posts/manage-training/manage-training.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"tags": ["manage-training"],
"eleventyNavigation": {
"parent": "Manage training for early career teachers"
}
Expand Down
1 change: 0 additions & 1 deletion app/posts/posts.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"layout": "post",
"permalink": "{{ page.filePathStem | replace('posts/', '') }}/",
"tags": ["search-index"],
"eleventyComputed": {
"eleventyNavigation": {
"key": "{{ title }}",
Expand Down
1 change: 0 additions & 1 deletion app/posts/register-for-an-npq/register-for-an-npq.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"tags": ["register-for-an-npq"],
"eleventyNavigation": {
"parent": "Register for an NPQ"
}
Expand Down
1 change: 0 additions & 1 deletion app/posts/support-for-cpd/support-for-cpd.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"tags": ["support-for-cpd"],
"eleventyNavigation": {
"parent": "Support services"
}
Expand Down

0 comments on commit 7c9258a

Please sign in to comment.