Skip to content

Commit

Permalink
Suppress volunteers page
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesdring committed Oct 17, 2024
1 parent c27b2d4 commit 3ead6a4
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions _config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,15 @@ site.copy("assets/vendor/");
[ 'volunteers/checkpoints-monthly.csv', 'volunteers/_data/checkpoints_monthly.csv' ],
[ 'volunteers/shifts-monthly.csv', 'volunteers/_data/shifts_monthly.csv' ],
[ 'volunteers/shifts-weekly.csv', 'volunteers/_data/shifts_weekly.csv' ],
].forEach(([source, target]) => site.remoteFile(
target,
`data/${source}`
))
].forEach(async ([source, target]) => {
const file = `data/${source}`;
try {
await Deno.lstat(file);
return site.remoteFile(target, file);
} catch(e) {
console.error(e.message);
}
})

// Set up some global data
site.data('landingPage', 'placeholder', '/landing');
Expand All @@ -144,6 +149,11 @@ site.process(['.html'], (pages) => pages.forEach(page => {
})
// Another kludge to avoid memory leaks on large pages
page.content;
}))
}));

// Suppress site pages
[
'/volunteers',
].forEach(p => site.data('url', false, p));

export default site;

0 comments on commit 3ead6a4

Please sign in to comment.