feat: add a better integration of the authors

This commit is contained in:
2022-12-04 20:14:28 +01:00
parent 63aa82a960
commit 9520f303ea

View File

@@ -104,7 +104,10 @@ module.exports = function(eleventyConfig) {
});
eleventyConfig.addFilter("readableAuthors", (authors) => {
return authors ? "par " + (authors || []).join(" & ") : "";
if (authors.length > 1) {
return "par " + authors.slice(0, -1).join(", ") + " et " + authors.slice(-1);
}
return "par " + (authors || []);
});
eleventyConfig.addFilter("noHome", elements => {