fix: artist concert notes; ics timing
This commit is contained in:
parent
82e2fa887a
commit
a26e34f2ef
5 changed files with 11 additions and 11 deletions
|
@ -171,14 +171,15 @@ export const albumReleasesCalendar = (collection) => {
|
||||||
const events = albumReleases.map(album => {
|
const events = albumReleases.map(album => {
|
||||||
const date = DateTime.fromFormat(album.date, 'MMMM d, yyyy')
|
const date = DateTime.fromFormat(album.date, 'MMMM d, yyyy')
|
||||||
if (!date.isValid) return null
|
if (!date.isValid) return null
|
||||||
|
|
||||||
return {
|
return {
|
||||||
start: [
|
start: [
|
||||||
date.year,
|
date.year,
|
||||||
date.month,
|
date.month,
|
||||||
date.day,
|
date.day
|
||||||
0, 0
|
|
||||||
],
|
],
|
||||||
|
startInputType: 'local',
|
||||||
|
startOutputType: 'local',
|
||||||
|
duration: { days: 1 },
|
||||||
title: `Release: ${album.artist} / ${album.title}`,
|
title: `Release: ${album.artist} / ${album.title}`,
|
||||||
description: `Check out this new album release: ${album.url}`,
|
description: `Check out this new album release: ${album.url}`,
|
||||||
url: album.url,
|
url: album.url,
|
||||||
|
@ -189,12 +190,12 @@ export const albumReleasesCalendar = (collection) => {
|
||||||
|
|
||||||
const { error, value } = ics.createEvents(events)
|
const { error, value } = ics.createEvents(events)
|
||||||
if (error) {
|
if (error) {
|
||||||
console.error('Error creating ICS events:', error)
|
console.error('Error creating events:', error)
|
||||||
events.forEach((event, index) => {
|
events.forEach((event, index) => {
|
||||||
console.error(`Event ${index}:`, event)
|
console.error(`Event ${index}:`, event)
|
||||||
})
|
})
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
|
|
||||||
return value
|
return value;
|
||||||
}
|
}
|
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "coryd.dev",
|
"name": "coryd.dev",
|
||||||
"version": "21.5.1",
|
"version": "21.5.2",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "coryd.dev",
|
"name": "coryd.dev",
|
||||||
"version": "21.5.1",
|
"version": "21.5.2",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@cdransf/api-text": "^1.4.0",
|
"@cdransf/api-text": "^1.4.0",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "coryd.dev",
|
"name": "coryd.dev",
|
||||||
"version": "21.5.1",
|
"version": "21.5.2",
|
||||||
"description": "The source for my personal site. Built using 11ty (and other tools).",
|
"description": "The source for my personal site. Built using 11ty (and other tools).",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import { createClient } from '@supabase/supabase-js'
|
import { createClient } from '@supabase/supabase-js'
|
||||||
import { DateTime } from 'luxon'
|
import { DateTime } from 'luxon'
|
||||||
import { sanitizeMediaString, parseCountryField } from '../../config/utilities/index.js'
|
|
||||||
|
|
||||||
const SUPABASE_URL = process.env.SUPABASE_URL
|
const SUPABASE_URL = process.env.SUPABASE_URL
|
||||||
const SUPABASE_KEY = process.env.SUPABASE_KEY
|
const SUPABASE_KEY = process.env.SUPABASE_KEY
|
||||||
|
|
|
@ -82,8 +82,8 @@ schema: artist
|
||||||
<li>
|
<li>
|
||||||
On <strong class="highlight-text">{{ concert.date | date: "%B %e, %Y" }}</strong>
|
On <strong class="highlight-text">{{ concert.date | date: "%B %e, %Y" }}</strong>
|
||||||
{% if venue %} at {{ venue }}{% endif %}
|
{% if venue %} at {{ venue }}{% endif %}
|
||||||
{%- if concert.concert_notes -%}
|
{%- if concert.notes -%}
|
||||||
{% assign notes = concert.concert_notes | prepend: "### Notes\n" | markdown %}
|
{% assign notes = concert.notes | prepend: "### Notes\n" | markdown %}
|
||||||
{% render "partials/blocks/modal.liquid", label:"Concert info", icon:"info-circle", content:notes, id:concert.id %}
|
{% render "partials/blocks/modal.liquid", label:"Concert info", icon:"info-circle", content:notes, id:concert.id %}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
</li>
|
</li>
|
||||||
|
|
Reference in a new issue