feat(*.liquid): apply prettier to liquid templates

- offer to create tag when none is found while adding a link from cli
- fix tag display in search
This commit is contained in:
Cory Dransfeldt 2025-06-16 14:40:54 -07:00
parent 49e21d574e
commit efe701f939
No known key found for this signature in database
112 changed files with 1319 additions and 1134 deletions

View file

@ -1,4 +1,4 @@
import ics from 'ics';
import ics from "ics";
export const albumReleasesCalendar = (collection) => {
const collectionData = collection.getAll()[0];
@ -8,7 +8,7 @@ export const albumReleasesCalendar = (collection) => {
globals: { url }
} = data;
if (!all || all.length === 0) return '';
if (!all || all.length === 0) return "";
const events = all
.map((album) => {
@ -16,15 +16,15 @@ export const albumReleasesCalendar = (collection) => {
if (isNaN(date.getTime())) return null;
const albumUrl = album.url?.includes('http') ? album.url : `${url}${album.url}`;
const artistUrl = album.artist.url?.includes('http')
const albumUrl = album.url?.includes("http") ? album.url : `${url}${album.url}`;
const artistUrl = album.artist.url?.includes("http")
? album.artust.url
: `${url}${album.artist.url}`;
return {
start: [date.getFullYear(), date.getMonth() + 1, date.getDate()],
startInputType: 'local',
startOutputType: 'local',
startInputType: "local",
startOutputType: "local",
title: `Release: ${album.artist.name} - ${album.title}`,
description: `Check out this new album release: ${albumUrl}. Read more about ${album.artist.name} at ${artistUrl}`,
url: albumUrl,
@ -34,12 +34,12 @@ export const albumReleasesCalendar = (collection) => {
.filter((event) => event !== null);
const { error, value } = ics.createEvents(events, {
calName: 'Album releases calendar • coryd.dev'
calName: "Album releases calendar • coryd.dev"
});
if (error) {
console.error('Error creating events: ', error);
return '';
console.error("Error creating events: ", error);
return "";
}
return value;