From ee5ab23eb642c5bb2ef89338afe1e08f9db67c0c Mon Sep 17 00:00:00 2001 From: thiloho <123883702+thiloho@users.noreply.github.com> Date: Sun, 27 Apr 2025 10:52:05 +0200 Subject: [PATCH] Remove astro unique hash from track name --- src/pages/tracks.astro | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pages/tracks.astro b/src/pages/tracks.astro index 62f6ca4..963bf6e 100644 --- a/src/pages/tracks.astro +++ b/src/pages/tracks.astro @@ -7,7 +7,10 @@ const albumCovers = await Astro.glob("../content/album-covers/*"); const processedAlbumCovers = albumCovers.map((cover) => { const filePathWithoutParams = cover.default.src.split("?")[0]; - const filename = parse(filePathWithoutParams).name; + const filename = parse(filePathWithoutParams).name.replace( + /\.[a-zA-Z0-9]+$/, + "", + ); const lastDashIndex = filename.lastIndexOf(" - "); const artists =