From 518b8b98565f03f7f304e7ea39482b39953f68bb Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Fri, 3 Nov 2023 09:47:06 -0700 Subject: [PATCH] Fix gemini URLs --- layouts/partials/post-meta.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/layouts/partials/post-meta.html b/layouts/partials/post-meta.html index 4546bb4..1ddc9d2 100644 --- a/layouts/partials/post-meta.html +++ b/layouts/partials/post-meta.html @@ -12,13 +12,20 @@ {{- end -}} {{- $needsModTime := gt (sub .Lastmod.Unix .Date.Unix) 900 -}} {{- $needsList := or (and (not $shortMeta) $needsModTime) (not $isNotes) -}} +{{- $gemini := "" }} +{{- with .OutputFormats.Get "gemtext" -}} + {{- $gemini = replace .Permalink "/gemini" "" 1 | safeURL -}} +{{- end -}} +{{- if not (eq .Page.Section "posts" ) -}} + {{- $gemini = replace $gemini "/index.gmi" ".gmi" | safeURL -}} +{{- end -}} {{- if $needsList }}