Gemini: Add dates to lists, fix WebP images

This commit is contained in:
JP Hastings-Spital 2024-05-01 09:21:07 +01:00
parent 85b9937424
commit 991638e799
3 changed files with 5 additions and 5 deletions

View file

@ -63,7 +63,7 @@ tasks:
gemini-dev:
desc: Builds the site & starts a gemini server (on the default port) for it.
cmds:
- agate --content public --addr 0.0.0.0:1965 --ed25519 --only-tls13 --lang en-GB --hostname "{{ .gmi_domain }}{{ .puma_dev_tld }}" --central-conf
- agate --content public --addr 0.0.0.0:1965 --ed25519 --only-tls13 --hostname "{{ .gmi_domain }}{{ .puma_dev_tld }}" --central-conf
gemini-deploy:
desc: Builds, reduces, and deploys the gemini version of the site with fly.

View file

@ -10,7 +10,7 @@
{{- range $paginatorGroup }}
## {{ .Key }}
{{ range .Pages -}}
=> {{ partial "noindex.gmi" .RelPermalink }} {{ with .Params.emoji }}{{ . }} {{ end }}{{ partial "page-title.txt" . }}
=> {{ partial "noindex.gmi" .RelPermalink }} {{ with .Params.emoji }}{{ . }} {{ end }}{{ .Date.Format "2006-01-02" }} {{ partial "page-title.txt" . }}
{{ end -}}
{{- end -}}
{{- end -}}

View file

@ -9,10 +9,10 @@
{{ range $bundledEvents -}}
{{- $hour := .Date.Format "15" -}}
{{- $duration := .Duration.Hours -}}
{{- $span := "eve" }}
{{- if and (gt $hour 9) (lt $hour 17) }}{{ $span = "day" }}{{ end -}}
{{- $span := "evening" }}
{{- if and (gt $hour 9) (lt $hour 17) }}{{ $span = "daytime" }}{{ end -}}
{{- if ge $duration 24 }}{{ $span = "multi-day" }}{{ end -}}
=> {{ .Page.RelPermalink }} {{ with .Page.Params.emoji }}{{ . }} {{ end }}{{.Page.Title}} ({{ .Date.Format "Jan 2"}}, {{ $span }})
=> {{ .Page.RelPermalink }} {{ with .Page.Params.emoji }}{{ . }} {{ end }}{{ .Date.Format "2006-01-02"}} {{.Page.Title}} ({{ $span }})
{{ end -}}
{{- end -}}
{{- end -}}