fix: calendar title

This commit is contained in:
Cory Dransfeldt 2024-08-31 11:31:50 -07:00
parent 6005b8ee9a
commit de566a3205
No known key found for this signature in database
3 changed files with 7 additions and 6 deletions

View file

@ -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)