mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-09 01:35:56 +01:00
This seems to mostly work! It's configured to work with Agate, and I haven't figured out the deploy mechanism yet — but it's a start!
8 lines
456 B
Text
8 lines
456 B
Text
{{- $displayArtist := (.Get "composer") | default (.Get "artist") -}}
|
|
{{- $displayTitle := (.Get "title") | default (.Get "album") -}}
|
|
{{- $songwhip := .Get "url" -}}
|
|
{{- if $displayArtist -}}
|
|
{{- $songwhip = printf "https://songwhip.com/%s/%s" (partial "kebab.txt" (.Get "artist")) (partial "kebab.txt" $displayTitle) }}
|
|
{{- end -}}
|
|
|
|
=> {{ $songwhip }} 🎵 {{ $displayArtist }}{{ with $displayTitle }}{{ if $displayArtist }}: {{ end }}{{ . }}{{ end }}
|