Compare commits

...

5 commits

9 changed files with 120 additions and 7 deletions

2
.envrc Normal file
View file

@ -0,0 +1,2 @@
#!/usr/bin/env direnv
use flake .

5
.gitignore vendored
View file

@ -4,5 +4,6 @@
/package.json
/public/
/resources/
/.env*
/.env
/.direnv/
/.certificates/

View file

@ -7,20 +7,32 @@ languageCode = "en"
DefaultContentLanguage = "en"
enableInlineShortcodes = true
# define gemini media type
[mediaTypes]
[mediaTypes.'text/gemini']
suffixes = ["gmi"]
# Automatically add content sections to main menu
# sectionPagesMenu = "main"
[outputs]
home = ['html', 'rss']
home = ['html', 'rss', 'gemini']
section = ['html']
taxonomy = ['html',]
taxonomy = ['html']
term = ['html', 'rss']
page = ['html', 'rss', 'gemini']
# rename rss output from index.xml to feed.xml
[outputFormats]
[outputFormats.rss]
mediatype = "application/rss"
baseName = "feed"
[outputFormats.gemini]
mediatype = "text/gemini"
isPlainText = true
isHTML = false
protocol = "gemini://"
permalinkable = true
[permalinks]
posts = ":filename"

View file

@ -7,6 +7,7 @@ kudos = false
+++
We're not sure what you were looking for but it's not here.
![Animated GIF from the movie "The Naked Gun". A man in the foreground proclaims "Please disperse. Nothing to see here." while a building explodes in the background.](/images/nothing-to-see-here.gif)
Maybe head back [home](/)?

View file

@ -5,6 +5,7 @@ timeless = true
comments = false
aliases = ["tldr", "bio"]
+++
![Me, +/- a few decades](/images/john.jpg)
You've (somehow) managed to stumble upon my dark corner of the internet[^1].
@ -36,7 +37,5 @@ Connect with me via:
- [XMPP](https://conversations.im/i/jbowdre@omg.lol?omemo-sid-1374125881=a620f3c57733601a6646f6f13a71c86fc9be8dd4126fd158ef3e0a26beb0b434)
- [Electronic Mail](mailto:jbowdre@omg.lol)
- [PGP: 613F B70C 4FA7 A077](https://l.runtimeterror.dev/pgp)
[^1]: Congrats? And also, *thank you.*
[^2]: A bit. I'm still in the "fake it until you make" it phase of adulthood.
[^2]: A bit. I'm still in the "fake it until you make" it phase of adulthood.

27
flake.lock Normal file
View file

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1708807242,
"narHash": "sha256-sRTRkhMD4delO/hPxxi+XwLqPn8BuUq6nnj4JqLwOu0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "73de017ef2d18a04ac4bfd0c02650007ccb31c2a",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

22
flake.nix Normal file
View file

@ -0,0 +1,22 @@
{
description = "runtimeterror build environment";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }:
let
pkgs = import nixpkgs { system = "x86_64-linux"; };
in
{
devShells.x86_64-linux.default = pkgs.mkShell {
packages = with pkgs; [
agate
go
hugo
nodePackages.npm
];
};
};
}

View file

@ -0,0 +1,7 @@
## [runtimeterror $]
{{ $pages := .Pages -}}
{{ $pages = where site.RegularPages "Type" "in" site.Params.mainSections -}}
{{ range $pages }}
=> {{ .RelPermalink }} [{{ .Date.Format "2006-01-02" }}] {{ .Title }}
{{- end }}

View file

@ -0,0 +1,42 @@
=> / 🏡 [runtimeterror $]
# {{ .Title }}{{ $scratch := newScratch }}
{{ $content := .RawContent -}}
{{ $content := $content | replaceRE `#### ` "### " -}}
{{ $content := $content | replaceRE `\n- (.+?)` "\n* $1" -}}
{{ $content := $content | replaceRE `\n(\d+). (.+?)` "\n* $2" -}}
{{ $content := $content | replaceRE `\[\^(.+?)\]:.*\n?\n?` "" -}}
{{ $content := $content | replaceRE `\[\^(.+?)\]` "" -}}
{{ $content := $content | replaceRE `<br/??>` "\n" -}}
{{ $content := $content | replaceRE `\{\{%\s\/?notice.*%\}\}` "***" -}}
{{ $content := $content | replaceRE `((\/\/)|#)\s*torchlight!.*` "" -}}
{{ $content := $content | replaceRE `<!--\s*\[tl!.*\]\s*-->` "" -}}
{{ $content := $content | replaceRE `\/\/\s*\[tl!.*\]` "" -}}
{{ $content := $content | replaceRE `#\s*\[tl!.*\]` "" -}}
{{ $content := $content | replaceRE `<a .*href="(.+?)".*>(.+?)</a>` "[$2]($1)" -}}
{{ $content := $content | replaceRE `\sgemini://(\S*)` " [gemini://$1](gemini://$1)" -}}
{{/* $content := $content | replaceRE "([^`])<.*?>([^`])" "$1$2" -*/}}
{{ $content := $content | replaceRE `\n?\n!\[.*\]\((.+?) \"(.+?)\"\)` "\n\n=> $1 Image: $2" -}}
{{ $content := $content | replaceRE `\n?\n!\[.*\]\((.+?)\)` "\n\n=> $1 Embedded Image: $1" -}}
{{ $links := findRE `\n=> ` $content }}{{ $scratch.Set "ref" (add (len $links) 1) }}
{{ $refs := findRE `\[.+?\]\(.+?\)` $content }}
{{ $scratch.Set "content" $content }}{{ range $refs }}{{ $ref := $scratch.Get "ref" }}{{ $contentInLoop := $scratch.Get "content" }}{{ $url := (printf "%s #%d" . $ref) }}{{ $contentInLoop := replace $contentInLoop . $url -}}{{ $scratch.Set "content" $contentInLoop }}{{ $scratch.Set "ref" (add $ref 1) }}{{ end }}{{ $content := $scratch.Get "content" | replaceRE `\[(.+?)\]\((.+?)\) #(\d+)` "$1 [$3]" -}}
{{ $content | safeHTML }}
---
Written by John Bowdre {{ if .Params.Date }} on {{ .Lastmod.Format "2006-01-02" }}.{{ end}}
=> mailto:blog@runtimeterror.dev 📧 Reply via email
## Links
{{ $scratch.Set "ref" (add (len $links) 1) }}{{ range $refs }}{{ $ref := $scratch.Get "ref" }}{{ $url := (printf "%s #%d" . $ref) }}
=> {{ $url | replaceRE `\[(.+?)\]\((.+?)\) #(\d+)` "$2 [$3] $1 ($2)" -}}
{{ $scratch.Set "ref" (add $ref 1) }}{{ end}}
{{ $related := first 3 (where (where .Site.RegularPages.ByDate.Reverse ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }}
{{ if $related }}
## Related articles
{{ range $related }}
=> {{ replace .RelPermalink "/gemini" "" 1}} {{ .Title }}{{ end }}{{ end }}
---
=> / Back to the Index
=> https://runtimeterror.dev{{ replace (replace .RelPermalink "/gemini" "" 1) "index.gmi" "" }} View this article on the WWW