add gemini aswell

This commit is contained in:
Dominic Reich 2025-02-09 11:28:21 +01:00
parent 24868e6a39
commit f36c1c66dd
Signed by: dominic
GPG key ID: 0B5787DB23049C45
3 changed files with 41 additions and 2 deletions

View file

@ -62,6 +62,8 @@ disableKinds = ["RSS"] # kick out RSS
[mediaTypes]
[mediaTypes."application/atom+xml"]
suffixes = ["xml"]
[mediaTypes."text/gemini"]
suffixes = ["gmi"]
[outputFormats.HTML]
@ -75,6 +77,14 @@ isPlainText = true
Protocol = "gopher://"
noUgly = false
[outputFormats.gemini]
MediaType = "text/gemini"
isPlainText = true
isHTML = false
Protocol = "gemini://"
permalinkable = true
[outputFormats.ATOM]
MediaType = "application/atom+xml"
BaseName = "feed"
@ -107,9 +117,9 @@ isHTML = true
notAlternative = true
[outputs]
home = [ "HTML", "gopher", "ATOM", "JSON", "HumansTXT", "Tootpick"]
home = [ "HTML", "gopher", "gemini", "ATOM", "JSON", "HumansTXT", "Tootpick"]
section = [ "HTML", "gopher" ]
page = [ "HTML", "gopher" ]
page = [ "HTML", "gopher", "gemini" ]
taxonomy = [ "HTML", "gopher" ]
#taxonomyTerm = [ "HTML" ]

View file

@ -0,0 +1,15 @@
# {{ .Title }}
{{ .RawContent }}
{{- $content := .RawContent -}}
{{- $content = $content | replaceRE `\!\[(.+?)\]\((.+?)\)` "=> $2 Image: $1" }}
{{ $content }}
{{- range findRE `\[.+?\]\(.+?\)` $content }}
{{- $content = $content | replaceRE `\[(.+?)\]\((.+?)\)(.+)` "$1$3\n\n=> $2 $1 " }}
{{- end }}
{{ if .Next }}=> {{ .Next.RelPermalink }} ← Newer: {{ .Next.Title }}{{ end }}
{{ if .Prev -}}=> {{ .Prev.RelPermalink }} → Older: {{ .Prev.Title }}{{- end }}

14
layouts/index.gmi Normal file
View file

@ -0,0 +1,14 @@
## List of posts
{{ range .RegularPages }}
=> {{ .RelPermalink }} {{ .Title }}
{{- end }}
## Posts grouped by year
{{ range .RegularPages.GroupByDate "2006" }}
### {{ .Key }}
{{ range .Pages.ByDate.Reverse }}
=> {{ .RelPermalink }} {{ .Title }}
{{- end }}
{{ end }}