From 469317350742db76dec3ebd42a6e8631b3549a4fc44175895ea0e7518280669f Mon Sep 17 00:00:00 2001 From: Nicholas Johnson Date: Fri, 16 Aug 2024 00:00:00 +0000 Subject: Combine two replaceRE ops into one --- layouts/taxonomy/taxonomy.gemini_atom.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'layouts/taxonomy') diff --git a/layouts/taxonomy/taxonomy.gemini_atom.xml b/layouts/taxonomy/taxonomy.gemini_atom.xml index 77de32c..6bd32ff 100644 --- a/layouts/taxonomy/taxonomy.gemini_atom.xml +++ b/layouts/taxonomy/taxonomy.gemini_atom.xml @@ -32,11 +32,11 @@ {{ "" | safeHTML }} - {{ .Permalink | replaceRE `^https://` "gemini://" | replaceRE `index.gmi$` "" }} + {{ .Permalink | replaceRE `^https://(.*)index.gmi$` "gemini://$1" }} {{ .Site.Title }} {{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }} - - + + {{- with $authorName }} {{ . }} @@ -47,9 +47,9 @@ {{ replace .Site.Copyright "{currentYear}" (now.UTC.Format "2006") }} {{ .Site.Params.Description }}{{ range first .Site.Config.Services.RSS.Limit .Data.Pages }} - {{ .Permalink | replaceRE `^https://` "gemini://" | replaceRE `index.gmi$` "" | safeURL }} + {{ .Permalink | replaceRE `^https://(.*)index.gmi$` "gemini://$1" | safeURL }} {{ .Title }} {{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }} - + {{ end }} -- cgit v1.2.3