aboutsummaryrefslogblamecommitdiff
path: root/layouts/_default/list.gmi
blob: 85607605621687a36cdb96156439ee76d4479211 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                                                                                                           
# {{ .Title }}

{{ $content := .Content -}}

{{ $content := $content | replaceRE `{{<\s*(?:rel)?ref\s+"([^"]+)"\s*>}}` "$1" -}}
{{ $content := $content | replaceRE `{{<\s*figure\s*(?:.*)?src="([^"]+)"(?:.*)?caption="([^"]+)"(?:.*)?>}}` "![$2]($1)" -}}
{{ $content := $content | replaceRE `{{<\s*image\s*.*?src="([^"]+)".*?>}}` "![]($1)" -}}
{{ $content := $content | replaceRE "(?s:< !--more-- >)" "" -}}
{{ $content := $content | replace "<!-- more -->" "" -}}
{{ $content := $content | replaceRE `\[(.+?)\]\((.+?)\)` "\n=> $2 $1\n" -}}

{{ $content }}

{{ range .Pages.ByPublishDate.Reverse }}
=> {{ .RelPermalink | replaceRE `index.gmi` `` }}{{if .Date }} {{ .Date.Format "2006-01-02" }}{{ end }} {{ .Title }}
{{ end }}