From 3b77b61bf662efe71c7f75e73a2d6fae0e3c8c8b74b05f036809b0913785a432 Mon Sep 17 00:00:00 2001 From: Nicholas Johnson Date: Fri, 8 Nov 2024 00:00:00 +0000 Subject: Replace replaceRE with TrimSuffix for readability --- layouts/_default/single.gmi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'layouts/_default/single.gmi') diff --git a/layouts/_default/single.gmi b/layouts/_default/single.gmi index 29c740e..a2f517d 100644 --- a/layouts/_default/single.gmi +++ b/layouts/_default/single.gmi @@ -1,6 +1,6 @@ {{ define "main" -}} {{ $emoji := cond (.Page.Params.showlinkemoji | default true) (emojify ":link: ") "" -}} -=> {{ .Site.Home.RelPermalink | replaceRE `index.gmi$` "" }} {{ emojify ":link:" }} {{ i18n "returnHome" -}} +=> {{ .Site.Home.RelPermalink | strings.TrimSuffix "index.gmi" }} {{ emojify ":link:" }} {{ i18n "returnHome" -}} {{ if (.Page.Params.pageinfo | default true) }} -- cgit v1.2.3