mirror of
https://github.com/jbowdre/runtimeterror.git
synced 2024-11-26 00:42:18 +00:00
minor gemini layout tweaks
This commit is contained in:
parent
337885c000
commit
a4107cf8af
2 changed files with 14 additions and 19 deletions
|
@ -1,22 +1,12 @@
|
||||||
```
|
# [runtimeterror $]
|
||||||
___ _ _ _ _ ___
|
=> /about Adventures in self-hosting and other technological frustrations.
|
||||||
| _| | | (_) | | | |_ |
|
|
||||||
| | _ __ _ _ _ __ | |_ _ _ __ ___ ___| |_ ___ _ __ _ __ ___ _ __ / __)| |
|
|
||||||
| || '__| | | | '_ \| __| | '_ ` _ \ / _ \ __/ _ \ '__| '__/ _ \| '__| \__ \| |
|
|
||||||
| || | | |_| | | | | |_| | | | | | | __/ || __/ | | | | (_) | | ( /| |
|
|
||||||
| ||_| \__,_|_| |_|\__|_|_| |_| |_|\___|\__\___|_| |_| \___/|_| |_|_| |
|
|
||||||
|___| |___|
|
|
||||||
```
|
|
||||||
|
|
||||||
Adventures in self-hosting and other technological frustrations.
|
|
||||||
|
|
||||||
{{ $pages := .Pages -}}
|
{{ $pages := .Pages -}}
|
||||||
{{ $pages = where site.RegularPages "Type" "in" site.Params.mainSections -}}
|
{{ $pages = where site.RegularPages "Type" "in" site.Params.mainSections -}}
|
||||||
|
|
||||||
|
### Posts
|
||||||
{{ range $pages }}
|
{{ range $pages }}
|
||||||
=> {{ .RelPermalink }} [{{ .Date.Format "2006-01-02" }}] {{ .Title }}
|
=> {{ .RelPermalink }} {{ .Date.Format "2006-01-02" }} {{ .Title }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
---
|
---
|
||||||
=> /about About
|
=> https://runtimeterror.dev This site on the big web
|
||||||
=> https://runtimeterror.dev View this site on the WWW
|
|
|
@ -1,6 +1,12 @@
|
||||||
=> / 💻 [runtimeterror $]
|
=> / 💻 [runtimeterror $]
|
||||||
|
|
||||||
# {{ .Title }}{{ $scratch := newScratch }}
|
# {{ .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 := .RawContent -}}
|
||||||
{{ $content := $content | replaceRE `#### ` "### " -}}
|
{{ $content := $content | replaceRE `#### ` "### " -}}
|
||||||
{{ $content := $content | replaceRE `\n- (.+?)` "\n* $1" -}}
|
{{ $content := $content | replaceRE `\n- (.+?)` "\n* $1" -}}
|
||||||
|
@ -24,10 +30,9 @@
|
||||||
{{ $content | safeHTML }}
|
{{ $content | safeHTML }}
|
||||||
|
|
||||||
---
|
---
|
||||||
Written by John Bowdre {{ if .Params.Date }} on {{ .Lastmod.Format "2006-01-02" }}.{{ end}}
|
|
||||||
=> mailto:blog@runtimeterror.dev 📧 Reply via email
|
=> 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) }}
|
{{ $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)" -}}
|
=> {{ $url | replaceRE `\[(.+?)\]\((.+?)\) #(\d+)` "$2 [$3] $1 ($2)" -}}
|
||||||
{{ $scratch.Set "ref" (add $ref 1) }}{{ end}}
|
{{ $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 }}
|
=> {{ replace .RelPermalink "/gemini" "" 1}} {{ .Title }}{{ end }}{{ end }}
|
||||||
---
|
---
|
||||||
|
|
||||||
=> / Back to the Index
|
=> / Home
|
||||||
=> https://runtimeterror.dev{{ replace (replace .RelPermalink "/gemini" "" 1) "index.gmi" "" }} View this article on the WWW
|
=> https://runtimeterror.dev{{ replace (replace .RelPermalink "/gemini" "" 1) "index.gmi" "" }} This article on the big web
|
Loading…
Reference in a new issue