diff --git a/config.toml b/config.toml index 6c9ecec..e1d0233 100644 --- a/config.toml +++ b/config.toml @@ -27,3 +27,18 @@ autoHeadingIDType = 'blackfriday' [security.funcs] 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"] diff --git a/content/_index.md b/content/_index.md index ddf944e..1824a89 100644 --- a/content/_index.md +++ b/content/_index.md @@ -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] [1]: /about/ -[2]: https://www.viget.com/ diff --git a/themes/v2/layouts/_default/single.gmi b/themes/v2/layouts/_default/single.gmi new file mode 100644 index 0000000..4050587 --- /dev/null +++ b/themes/v2/layouts/_default/single.gmi @@ -0,0 +1,9 @@ +# {{ .Title }} +{{ $content := .RawContent -}} +{{ $content = $content | replaceRE `\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 `