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


{{ $content := .RawContent }}
{{- $content = $content | replaceRE `\n####{0,3}` "\n###" }}
{{- $content = $content | replaceRE `\n\[(.+?)\]\((.+?)\)` "\n=> $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 }}