From d54f296169ab29767836a1fcdd46c235c199b9105d00ff8635613393e46706da Mon Sep 17 00:00:00 2001 From: Nicholas Johnson Date: Fri, 16 Aug 2024 00:00:00 +0000 Subject: Remove "index.gmi" from Gemini Atom link suffixes --- layouts/index.gemini_atom.xml | 10 +++++----- layouts/taxonomy/taxonomy.gemini_atom.xml | 10 +++++----- layouts/term/term.gemini_atom.xml | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/layouts/index.gemini_atom.xml b/layouts/index.gemini_atom.xml index 2c5f682..8ceeba4 100644 --- a/layouts/index.gemini_atom.xml +++ b/layouts/index.gemini_atom.xml @@ -1,10 +1,10 @@ {{ "" | safeHTML }} - {{ replace .Permalink "https://" "gemini://" }} + {{ replace .Permalink "https://" "gemini://" | replaceRE `(?m)index.gmi$` "" }} {{ .Site.Title }} {{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }} - - + + {{ .Site.Author.name }} {{ .Site.Author.email }} @@ -13,9 +13,9 @@ {{ replace .Site.Copyright "{currentYear}" (now.UTC.Format "2006") }} {{ .Site.Params.Description }}{{ range first .Site.Config.Services.RSS.Limit .Site.RegularPages }} - {{ replace .Permalink "https://" "gemini://" | safeURL }} + {{ replace .Permalink "https://" "gemini://" | replaceRE `(?m)index.gmi$` "" | safeURL }} {{ .Title }} {{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }} - + {{ end }} diff --git a/layouts/taxonomy/taxonomy.gemini_atom.xml b/layouts/taxonomy/taxonomy.gemini_atom.xml index 84af3b3..097b859 100644 --- a/layouts/taxonomy/taxonomy.gemini_atom.xml +++ b/layouts/taxonomy/taxonomy.gemini_atom.xml @@ -1,10 +1,10 @@ {{ "" | safeHTML }} - {{ replace .Permalink "https://" "gemini://" }} + {{ replace .Permalink "https://" "gemini://" | replaceRE `(?m)index.gmi$` "" }} {{ .Site.Title }} {{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }} - - + + {{ .Site.Author.name }} {{ .Site.Author.email }} @@ -13,9 +13,9 @@ {{ replace .Site.Copyright "{currentYear}" (now.UTC.Format "2006") }} {{ .Site.Params.Description }}{{ range first .Site.Config.Services.RSS.Limit .Data.Pages }} - {{ replace .Permalink "https://" "gemini://" | safeURL }} + {{ replace .Permalink "https://" "gemini://" | replaceRE `(?m)index.gmi$` "" | safeURL }} {{ .Title }} {{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }} - + {{ end }} diff --git a/layouts/term/term.gemini_atom.xml b/layouts/term/term.gemini_atom.xml index 84af3b3..097b859 100644 --- a/layouts/term/term.gemini_atom.xml +++ b/layouts/term/term.gemini_atom.xml @@ -1,10 +1,10 @@ {{ "" | safeHTML }} - {{ replace .Permalink "https://" "gemini://" }} + {{ replace .Permalink "https://" "gemini://" | replaceRE `(?m)index.gmi$` "" }} {{ .Site.Title }} {{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }} - - + + {{ .Site.Author.name }} {{ .Site.Author.email }} @@ -13,9 +13,9 @@ {{ replace .Site.Copyright "{currentYear}" (now.UTC.Format "2006") }} {{ .Site.Params.Description }}{{ range first .Site.Config.Services.RSS.Limit .Data.Pages }} - {{ replace .Permalink "https://" "gemini://" | safeURL }} + {{ replace .Permalink "https://" "gemini://" | replaceRE `(?m)index.gmi$` "" | safeURL }} {{ .Title }} {{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }} - + {{ end }} -- cgit v1.2.3