diff --git a/config/collections/index.js b/config/collections/index.js index 5861fce9..b3a047ed 100644 --- a/config/collections/index.js +++ b/config/collections/index.js @@ -164,8 +164,9 @@ export const processContent = (collection) => { export const albumReleasesCalendar = (collection) => { const collectionData = collection.getAll()[0] const { data } = collectionData - const { albumReleases: { all } } = data; + const { albumReleases: { all } } = data if (!all || all.length === 0) return '' + const events = all.map(album => { const date = DateTime.fromFormat(album.date, 'MMMM d, yyyy') if (!date.isValid) return null @@ -182,7 +183,7 @@ export const albumReleasesCalendar = (collection) => { } }).filter(event => event !== null) - const { error, value } = ics.createEvents(events) + const { error, value } = ics.createEvents(events, { calName: 'Album releases calendar / coryd.dev' }) if (error) { console.error('Error creating events: ', error) diff --git a/package-lock.json b/package-lock.json index 3ec8ef7c..b7b46626 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "coryd.dev", - "version": "24.4.3", + "version": "24.4.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "coryd.dev", - "version": "24.4.3", + "version": "24.4.4", "license": "MIT", "dependencies": { "@cdransf/api-text": "^1.5.0", diff --git a/package.json b/package.json index c6f0a714..968f924a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coryd.dev", - "version": "24.4.3", + "version": "24.4.4", "description": "The source for my personal site. Built using 11ty (and other tools).", "type": "module", "scripts": { @@ -56,4 +56,4 @@ "slugify": "^1.6.6", "terser": "^5.31.6" } -} +} \ No newline at end of file