Gemini homepage

This commit is contained in:
David Eisinger
2025-02-19 01:09:28 -05:00
parent 340713952e
commit 81214f6c9e
2 changed files with 9 additions and 3 deletions

View File

@@ -1,8 +1,13 @@
{{- define "main" -}} {{- define "main" -}}
# David Eisinger # David Eisinger
{{ partial "gemtext.gmi" (dict "content" .RawContent "page" $.Page) }} {{ partial "gemtext.gmi" (dict "content" .RawContent "page" $.Page) -}}
{{ range (where .Site.RegularPages "Type" "in" "journal") -}}
## Recent Posts
{{ range first 10 (where .Site.RegularPages "Type" "in" "journal") -}}
=> {{ .RelPermalink | replaceRE `index.gmi` "" }} {{ .Title }} => {{ .RelPermalink | replaceRE `index.gmi` "" }} {{ .Title }}
{{ end -}} {{ end }}
=> /journal/ All Posts
{{- end -}} {{- end -}}

View File

@@ -55,5 +55,6 @@
{{- $content = $content | replaceRE `=> /(elsewhere[^ ])` (printf "=> %s$1" site.BaseURL) -}} {{- $content = $content | replaceRE `=> /(elsewhere[^ ])` (printf "=> %s$1" site.BaseURL) -}}
{{- $content = $content | replaceRE `(?m)^(\* [^\n]+)\n\n ` "$1 " -}} {{- $content = $content | replaceRE `(?m)^(\* [^\n]+)\n\n ` "$1 " -}}
{{- $content = $content | replaceRE `(?m)\n{3,}` "\n\n" }} {{- $content = $content | replaceRE `(?m)\n{3,}` "\n\n" }}
{{- $content = $content | replaceRE `\n+$` "" }}
{{- $content | safeHTML -}} {{- $content | safeHTML -}}