diff --git a/config/collections/index.js b/config/collections/index.js
index 320e8d4..3cc0c44 100644
--- a/config/collections/index.js
+++ b/config/collections/index.js
@@ -13,6 +13,23 @@ const postsByTag = (collection) => {
return postsByTag;
};
+const catalogueByType = (collection) => {
+ const allItems = collection.getFilteredByTag("catalogue");
+
+ const catalogueByType = {};
+
+ for (const item of allItems) {
+ const type = item.data.tags[1];
+ if (!type) continue;
+
+ catalogueByType[type] ??= [];
+ catalogueByType[type].push(item);
+ }
+
+ return catalogueByType;
+};
+
module.exports = {
postsByTag,
+ catalogueByType,
};
diff --git a/config/filters/index.js b/config/filters/index.js
index 8143685..9b34a68 100644
--- a/config/filters/index.js
+++ b/config/filters/index.js
@@ -4,7 +4,6 @@ const advancedFormat = require("dayjs/plugin/advancedFormat");
const postcss = require("postcss");
const cssnano = require("cssnano");
-const { default: slugify } = require("slugify");
const keys = Object.keys;
const values = Object.values;
diff --git a/eleventy.config.js b/eleventy.config.js
index 53e7abd..c2603b7 100644
--- a/eleventy.config.js
+++ b/eleventy.config.js
@@ -1,4 +1,7 @@
-const { postsByTag } = require("./config/collections/index.js");
+const {
+ postsByTag,
+ catalogueByType,
+} = require("./config/collections/index.js");
const { dir } = require("./config/constants.js");
const {
entries,
@@ -7,8 +10,6 @@ const {
values,
organizeByDate,
keys,
- filterByCategory,
- allTags,
allTagCounts,
filter,
} = require("./config/filters/index.js");
@@ -25,6 +26,7 @@ module.exports = (eleventyConfig) => {
// --------------------- Custom Collections -----------------------
eleventyConfig.addCollection("postsByTag", postsByTag);
+ eleventyConfig.addCollection("catalogueByType", catalogueByType);
// --------------------- Custom Filters -----------------------
eleventyConfig.addFilter("allTagCounts", allTagCounts);
diff --git a/jsconfig.json b/jsconfig.json
index 6555d57..cdee14e 100644
--- a/jsconfig.json
+++ b/jsconfig.json
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"module": "CommonJS",
- "target": "ES6"
+ "target": "ES2023"
},
"exclude": ["node_modules"]
}
diff --git a/src/_includes/partials/catalogue.html b/src/_includes/partials/catalogue.html
new file mode 100644
index 0000000..ddf76c2
--- /dev/null
+++ b/src/_includes/partials/catalogue.html
@@ -0,0 +1,21 @@
+{% set itemsByYear = items | organizeByDate %}
+{% set years = itemsByYear | keys | sort("desc") %}
+{{ year }}
+