blob: e47141e5c5fcb57a09cd6db786c1bc71bbf40bd7b0a82dcd9abee1c7e18b5103 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
{{ define "main" }}
{{ $emoji := cond (.Page.Params.showlinkemoji | default true) "{{ emojify ":link:" }} " "" -}}
=> / {{ emojify ":link:" }} Return to homepage
{{ if (.Page.Params.pageinfo | default true) }}{{ 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 }}
|