diff --git a/.build.yml b/.build.yml index ce0e353..1392d4d 100644 --- a/.build.yml +++ b/.build.yml @@ -49,6 +49,7 @@ tasks: DITHER_SERVER=http://localhost:4567 \ hugo --minify find public -name "*.enc" -type f -delete + find public/elsewhere -name "*.gmi" -type f -delete # Sync files to production server - deploy: | diff --git a/themes/v2/layouts/partials/gemtext.gmi b/themes/v2/layouts/partials/gemtext.gmi index 1ea28f8..0e95b9d 100644 --- a/themes/v2/layouts/partials/gemtext.gmi +++ b/themes/v2/layouts/partials/gemtext.gmi @@ -51,7 +51,8 @@ {{- $content = $content | replaceRE `(?m)^ \*` "* ⇢" -}} {{- $content = $content | replaceRE `(?m)^- ` "* " -}} {{- $content = $content | replaceRE `(?m)^[\*-]{3}$` "✱ ✱ ✱" -}} -{{- $content = $content | replaceRE `=> (/.+\.pdf)` (printf "=> %s$1" site.BaseURL) -}} +{{- $content = $content | replaceRE `=> /(.+\.pdf)` (printf "=> %s$1" site.BaseURL) -}} +{{- $content = $content | replaceRE `=> /(elsewhere[^ ])` (printf "=> %s$1" site.BaseURL) -}} {{- $content = $content | replaceRE `(?m)\n{3,}` "\n\n" }} {{- $content | safeHTML -}}