Gemini homepage
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
{{- define "main" -}}
|
||||
# David Eisinger
|
||||
|
||||
{{ partial "gemtext.gmi" (dict "content" .RawContent "page" $.Page) }}
|
||||
{{ range (where .Site.RegularPages "Type" "in" "journal") -}}
|
||||
{{ partial "gemtext.gmi" (dict "content" .RawContent "page" $.Page) -}}
|
||||
|
||||
## Recent Posts
|
||||
|
||||
{{ range first 10 (where .Site.RegularPages "Type" "in" "journal") -}}
|
||||
=> {{ .RelPermalink | replaceRE `index.gmi` "" }} {{ .Title }}
|
||||
{{ end -}}
|
||||
{{ end }}
|
||||
|
||||
=> /journal/ All Posts
|
||||
{{- end -}}
|
||||
|
||||
@@ -55,5 +55,6 @@
|
||||
{{- $content = $content | replaceRE `=> /(elsewhere[^ ])` (printf "=> %s$1" site.BaseURL) -}}
|
||||
{{- $content = $content | replaceRE `(?m)^(\* [^\n]+)\n\n ` "$1 " -}}
|
||||
{{- $content = $content | replaceRE `(?m)\n{3,}` "\n\n" }}
|
||||
{{- $content = $content | replaceRE `\n+$` "" }}
|
||||
|
||||
{{- $content | safeHTML -}}
|
||||
|
||||
Reference in New Issue
Block a user