From 43f54a4cd22fdb0b370b1648736267618db83d54 Mon Sep 17 00:00:00 2001 From: David Eisinger Date: Sun, 16 Feb 2025 02:21:34 -0500 Subject: [PATCH] Slightly nicer PDF handling --- themes/v2/layouts/partials/gemtext.gmi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/v2/layouts/partials/gemtext.gmi b/themes/v2/layouts/partials/gemtext.gmi index a8650a7..a0273b1 100644 --- a/themes/v2/layouts/partials/gemtext.gmi +++ b/themes/v2/layouts/partials/gemtext.gmi @@ -3,7 +3,7 @@ {{ $content = $content | replaceRE `\n+` "" -}} {{ $content = $content | replaceRE `\[([^\]]+)\]\[(\d+)\]` "$1[$2]" -}} {{ $content = $content | replaceRE `(?m)^\[(\d+)\]: (.*)$` "=> $2 [$1] $2" -}} -{{ $content = $content | replaceRE `=> (/.+\.pdf)` "=> https://davideisinger.com$1" -}} +{{ $content = $content | replaceRE `=> (/.+\.pdf)` (printf "=> %s$1" site.BaseURL) -}} {{ $content = $content | replaceRE `(?m) >` ">" -}} {{ $content = $content | replaceRE `(?m)^ \*` "* ⇢" -}} {{ $content = $content | replaceRE `(?m)^[\*-]{3}$` "✱ ✱ ✱" -}}