summaryrefslogtreecommitdiff
path: root/layouts/_default/single.gmi
blob: 93501e042915cf4e24c718d12e4da8f4c6efa0ea2f82a6e2c7d78383b463375e (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* " }}
{{- $content | safeHTML }}{{ end }}