From 664dd642ae1f7d030e9bd7c6fd1d0fa42ab7b3a4 Mon Sep 17 00:00:00 2001 From: JP Hastings-Spital Date: Mon, 3 Feb 2025 23:08:02 +0000 Subject: [PATCH] Fix Gemini --- Taskfile.yml | 2 +- layouts/partials/noindex.gmi | 2 +- layouts/shortcodes/film.gmi | 1 + layouts/shortcodes/importnote.gmi | 2 ++ 4 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 layouts/shortcodes/film.gmi create mode 100644 layouts/shortcodes/importnote.gmi diff --git a/Taskfile.yml b/Taskfile.yml index c3799e47..7dd5def3 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -4,7 +4,7 @@ version: '3' vars: domain: www.byjp.me - gmi_domain: byjp.me + gmi_domain: gemini.byjp.me puma_dev_tld: .test env: diff --git a/layouts/partials/noindex.gmi b/layouts/partials/noindex.gmi index d1654b28..ff1880f7 100644 --- a/layouts/partials/noindex.gmi +++ b/layouts/partials/noindex.gmi @@ -3,6 +3,6 @@ {{- $url = strings.TrimSuffix "index.gmi" $url -}} {{- end -}} {{- if hasPrefix $url "gemini://www.byjp.me" -}} - {{- $url = strings.Replace $url "gemini://www.byjp.me" "gemini://byjp.me" -}} + {{- $url = strings.Replace $url "gemini://www.byjp.me" "gemini://gemini.byjp.me" -}} {{- end -}} {{- return $url -}} diff --git a/layouts/shortcodes/film.gmi b/layouts/shortcodes/film.gmi new file mode 100644 index 00000000..001a3587 --- /dev/null +++ b/layouts/shortcodes/film.gmi @@ -0,0 +1 @@ +{{ .Get 0 }} ({{ .Get 1 }}) \ No newline at end of file diff --git a/layouts/shortcodes/importnote.gmi b/layouts/shortcodes/importnote.gmi new file mode 100644 index 00000000..846c6fef --- /dev/null +++ b/layouts/shortcodes/importnote.gmi @@ -0,0 +1,2 @@ +{{ $date := .Get 0 | time -}} +(Some context, from {{ sub $date.Year .Page.Date.Year }} years later: {{ .Inner }})