feat: serve audio as local Hugo page resources instead of Jellyfin

Download all 20 track MP3s from Jellyfin and store them as page bundle
resources (track.mp3). Update templates to use .Resources.GetMatch
instead of .Params.audio, removing external API key dependencies.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-15 22:51:30 +01:00
parent 4508596010
commit 3bccbdf82d
47 changed files with 25 additions and 44 deletions

View File

@@ -30,10 +30,10 @@
"@type": "Person",
"name": "{{ .Params.artist | default .Site.Params.author }}"
}
{{- if .Params.audio }},
{{- with .Resources.GetMatch "track.*" }},
"audio": {
"@type": "AudioObject",
"contentUrl": "{{ .Params.audio }}"
"contentUrl": "{{ .Permalink }}"
}
{{- end }}
{{- if .Params.genre }},

View File

@@ -30,13 +30,15 @@
{{- end }}
{{/* Audio-specific OpenGraph tags */}}
{{- if and (eq .Section "tracks") .Params.audio }}
<meta property="og:audio" content="{{ .Params.audio }}">
{{- if eq .Section "tracks" }}
{{- with .Resources.GetMatch "track.*" }}
<meta property="og:audio" content="{{ .Permalink }}">
<meta property="og:audio:type" content="audio/mpeg">
{{- if .Params.duration }}
<meta property="music:duration" content="{{ .Params.duration }}">
{{- end }}
{{- if .Params.artist }}
<meta property="music:musician" content="{{ .Params.artist }}">
{{- if $.Params.duration }}
<meta property="music:duration" content="{{ $.Params.duration }}">
{{- end }}
{{- if $.Params.artist }}
<meta property="music:musician" content="{{ $.Params.artist }}">
{{- end }}
{{- end }}

View File

@@ -1,6 +1,3 @@
{{/* Preconnect to external domains */}}
<link rel="preconnect" href="https://jellyfin.media.pivoine.art" crossorigin>
{{/* DNS prefetch */}}
<link rel="dns-prefetch" href="https://unpkg.com">