summaryrefslogtreecommitdiff
path: root/layouts/_default/single.gmi
blob: 1ae1a6a67b7eb6e3471aeb0def9ba2cf80a43fdc72af4a180be2c86a0c3eaf97 (plain)
1
2
3
4
5
6
7
8
{{ define "main" }}
=> ./{{ replaceRE ".+?/" "../" .RelPermalink | safeURL }} Return to homepage

{{ $content := .RawContent }}
{{- $content = $content | replaceRE `\[(.+?)\]\((.+?)\)` "=> $2 $1" }}
{{- $content = $content | replaceRE `\*{3}(.+?)\*{3}|\*{2}(.+?)\*{2}|\*{1}(.+?)\*{1}` "$1$2$3$4$5$6" }}
{{- $content = $content | replaceRE `\n- (.+?)` "\n* $1" }}
{{- $content | safeHTML }}{{ end }}