1
0
forked from ti-nuage/site

Traitement des articles anciens sur le blog.

This commit is contained in:
David Soulayrol
2023-03-25 15:07:50 +01:00
parent d22e2e81a3
commit 12a40e3be8
3 changed files with 37 additions and 2 deletions

View File

@@ -95,6 +95,17 @@ module.exports = new Metalsmith(config.paths.projectRoot)
archives: {
pattern: 'blog/*/**/*/*.html',
reverse: true,
filterBy: (article) => {
return new Date(article.date).getFullYear() !== new Date().getFullYear()
},
sortBy: 'date'
},
year: {
pattern: 'blog/*/**/*/*.html',
reverse: true,
filterBy: (article) => {
return new Date(article.date).getFullYear() === new Date().getFullYear()
},
sortBy: 'date'
},
news: {