summaryrefslogtreecommitdiff
path: root/layouts/_default/single.gmi
blob: 17d77bf6b8fad08d341978d8036d3aedaf91785f669a5d0e8b38e10e98e0f108 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{{ define "main" }}
{{ $emoji := cond (.Page.Params.nolinkemoji | default false) "" "🔗 " -}}
=> / 🔗 Return to homepage


{{ if .Page.Params.pageinfo }}{{ partial "pageinfo" . }}

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