{{ . | markdownify }}
- {{- end -}} {{- if or (.Get "caption") (.Get "attr") -}}{{- .Get "caption" | markdownify -}} {{- with .Get "attrlink" }} diff --git a/layouts/shortcodes/spotify.gmi b/layouts/shortcodes/spotify.gmi new file mode 100644 index 00000000..6b8353ac --- /dev/null +++ b/layouts/shortcodes/spotify.gmi @@ -0,0 +1,8 @@ +{{- $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 }} diff --git a/layouts/shortcodes/youtube.gmi b/layouts/shortcodes/youtube.gmi new file mode 100644 index 00000000..e53cf3e3 --- /dev/null +++ b/layouts/shortcodes/youtube.gmi @@ -0,0 +1,3 @@ +{{- $url := printf "https://www.youtube.com/watch?v=%s" (.Get 0) -}} +{{- $ref := partial "reference.obj" (dict "url" $url "references" .Page.Params.references)}} +=> {{$url}} {{ with $ref }}{{.name}}{{ end }} diff --git a/static/.meta b/static/.meta new file mode 100644 index 00000000..ea522bb3 --- /dev/null +++ b/static/.meta @@ -0,0 +1,3 @@ +# Agate metadata file (for serving Gemini with Agate) +# I use inline type descriptions (bold, italic) +**/*.gmi: ;type=inline;lang=en-GB