Theateraufführungen als Liste

This commit is contained in:
Simon Martens
2023-02-06 17:08:38 +01:00
parent 5874fdc0e2
commit ae2b1a7bcd
51 changed files with 340 additions and 109 deletions

View File

@@ -20,6 +20,24 @@ module.exports = function (config) {
});
});
config.addCollection("theater", function(collectionApi) {
return collectionApi
.getFilteredByGlob("**/lists/theaterauffuehrungen/*.html")
.sort(function(a, b) {
if (a.data.Jahr !== null && b.data.Jahr !== null &&
a.data.Jahr !== b.data.Jahr) {
return a.data.Jahr - b.data.Jahr;
} else if ( a.data.Name !== null && b.data.Name !== null &&
a.data.Name !== b.data.Name) {
return a.data.Name.localeCompare(b.data.Name);
} else if (a.data.Sort !== null && b.data.Sort !== null &&
a.data.Sort !== b.data.Sort) {
return a.data.Sort - b.data.Sort;
}
return 0;
});
});
config.addCollection("selbststaendigedrucke", function(collectionApi) {
return collectionApi
.getFilteredByGlob("**/lists/selbstaendige_drucke/*.html")