Start gemini output

This commit is contained in:
David Eisinger
2025-02-15 01:04:11 -05:00
parent c6e95046e3
commit 034d3e30d1
4 changed files with 30 additions and 1 deletions

View File

@@ -27,3 +27,18 @@ autoHeadingIDType = 'blackfriday'
[security.funcs] [security.funcs]
getenv = ['DITHER_SERVER'] getenv = ['DITHER_SERVER']
[mediaTypes."text/gemini"]
suffixes = ["gmi"]
[outputFormats.GEMINI]
name = "GEMINI"
isPlainText = true
isHTML = false
mediaType = "text/gemini"
protocol = "gemini://"
permalinkable = true
[outputs]
home = ["HTML", "RSS", "GEMINI"]
page = ["HTML", "GEMINI"]

View File

@@ -1,4 +1,3 @@
I'm a technologist in Durham, North Carolina, USA. I write about adventures with my family, stuff I make, and interesting things I find on the web. [More about me.][1] I'm a technologist in Durham, North Carolina, USA. I write about adventures with my family, stuff I make, and interesting things I find on the web. [More about me.][1]
[1]: /about/ [1]: /about/
[2]: https://www.viget.com/

View File

@@ -0,0 +1,9 @@
# {{ .Title }}
{{ $content := .RawContent -}}
{{ $content = $content | replaceRE `<!--more-->\n+` "" -}}
{{ $content = $content | replaceRE `\[([^\]]+)\]\[(\d+)\]` "$1[$2]" -}}
{{ $content = $content | replaceRE `(?m)^\[(\d+)\]: (.*)$` "=> $2 [$1] $2" -}}
{{ $content = $content | replaceRE `(?m)\n\n >` "\n\n" -}}
{{ $content = $content | replaceRE `(?m)\n\n ([^>])` " $1" -}}
{{ $content = $content | replaceRE `<audio controls src="([^"]+)"><\/audio>` "=> $1" }}
{{ $content | safeHTML }}

View File

@@ -0,0 +1,6 @@
# David Eisinger
{{ .RawContent }}
{{ range (where .Site.RegularPages "Type" "in" "journal") -}}
=> {{ .RelPermalink | replaceRE `index.gmi` "" }} {{ .Title }}
{{ end -}}