mirror of
https://github.com/jbowdre/runtimeterror.git
synced 2024-11-21 14:32:19 +00:00
minor gemini layout tweaks
This commit is contained in:
parent
4cf694fc47
commit
9bb7cf108d
2 changed files with 14 additions and 19 deletions
|
@ -1,22 +1,12 @@
|
|||
```
|
||||
___ _ _ _ _ ___
|
||||
| _| | | (_) | | | |_ |
|
||||
| | _ __ _ _ _ __ | |_ _ _ __ ___ ___| |_ ___ _ __ _ __ ___ _ __ / __)| |
|
||||
| || '__| | | | '_ \| __| | '_ ` _ \ / _ \ __/ _ \ '__| '__/ _ \| '__| \__ \| |
|
||||
| || | | |_| | | | | |_| | | | | | | __/ || __/ | | | | (_) | | ( /| |
|
||||
| ||_| \__,_|_| |_|\__|_|_| |_| |_|\___|\__\___|_| |_| \___/|_| |_|_| |
|
||||
|___| |___|
|
||||
```
|
||||
|
||||
Adventures in self-hosting and other technological frustrations.
|
||||
|
||||
# [runtimeterror $]
|
||||
=> /about Adventures in self-hosting and other technological frustrations.
|
||||
{{ $pages := .Pages -}}
|
||||
{{ $pages = where site.RegularPages "Type" "in" site.Params.mainSections -}}
|
||||
|
||||
### Posts
|
||||
{{ range $pages }}
|
||||
=> {{ .RelPermalink }} [{{ .Date.Format "2006-01-02" }}] {{ .Title }}
|
||||
=> {{ .RelPermalink }} {{ .Date.Format "2006-01-02" }} {{ .Title }}
|
||||
{{- end }}
|
||||
|
||||
---
|
||||
=> /about About
|
||||
=> https://runtimeterror.dev View this site on the WWW
|
||||
=> https://runtimeterror.dev This site on the big web
|
|
@ -1,6 +1,12 @@
|
|||
=> / 💻 [runtimeterror $]
|
||||
|
||||
# {{ .Title }}{{ $scratch := newScratch }}
|
||||
{{- if .Params.Date }}
|
||||
{{- $postDate := .Date.Format "2006-01-02" }}
|
||||
{{- $updateDate := .Lastmod.Format "2006-01-02" }}
|
||||
{{ $postDate }}{{ if ne $postDate $updateDate }} ~ {{ $updateDate }}{{ end }}
|
||||
{{- end }}
|
||||
{{/* The bulk of this regex magic is derived from https://brainbaking.com/post/2021/04/using-hugo-to-launch-a-gemini-capsule/ */}}
|
||||
{{ $content := .RawContent -}}
|
||||
{{ $content := $content | replaceRE `#### ` "### " -}}
|
||||
{{ $content := $content | replaceRE `\n- (.+?)` "\n* $1" -}}
|
||||
|
@ -24,10 +30,9 @@
|
|||
{{ $content | safeHTML }}
|
||||
|
||||
---
|
||||
Written by John Bowdre {{ if .Params.Date }} on {{ .Lastmod.Format "2006-01-02" }}.{{ end}}
|
||||
=> mailto:blog@runtimeterror.dev 📧 Reply via email
|
||||
|
||||
## Links
|
||||
## Bibliography
|
||||
{{ $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}}
|
||||
|
@ -38,5 +43,5 @@ Written by John Bowdre {{ if .Params.Date }} on {{ .Lastmod.Format "2006-01-02"
|
|||
=> {{ 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
|
||||
=> / Home
|
||||
=> https://runtimeterror.dev{{ replace (replace .RelPermalink "/gemini" "" 1) "index.gmi" "" }} This article on the big web
|
Loading…
Reference in a new issue