diff options
author | Brian Picciano <me@mediocregopher.com> | 2024-11-01 13:00:18 +0100 |
---|---|---|
committer | Brian Picciano <me@mediocregopher.com> | 2024-11-01 13:00:18 +0100 |
commit | cf6af6def1cac3fc6cd044c82282208b7073eb64 (patch) | |
tree | 64d6186b5e30e1125c1eff6fa1d86a379e3d3693 /example/tpl/render_gemtext_link.html | |
parent | 246a99c28980e985bb4cff99042459bd5729cde1 (diff) |
Implement gemtext HTTP middleware
Diffstat (limited to 'example/tpl/render_gemtext_link.html')
-rw-r--r-- | example/tpl/render_gemtext_link.html | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/example/tpl/render_gemtext_link.html b/example/tpl/render_gemtext_link.html new file mode 100644 index 0000000..b0d1251 --- /dev/null +++ b/example/tpl/render_gemtext_link.html @@ -0,0 +1,5 @@ +{{- $url := .URL }} +{{- if (hasPrefix "gemini://" $url) }} + {{- $url = printf "https://gemini.tildeverse.org/?%s" $url }} +{{- end }} +<p><a href="{{ $url }}">{{ .Label }}</a></p> |