feat(whereami): add weather summary to og:description

This commit is contained in:
Adriano Caloiaro 2026-04-10 05:59:11 -06:00
parent f1bca887b2
commit 007f8c0838
No known key found for this signature in database

View file

@ -6,11 +6,19 @@
{{ else }}
{{ with (. | transform.Unmarshal) }}
{{ with .location.name }}{{ $title = printf "Adriano is in %s :: adriano.fyi" . }}{{ end }}
{{ with .weather }}
{{ $parts := slice }}
{{ with .tempf }}{{ $parts = $parts | append (printf "%.0f°F" .) }}{{ end }}
{{ with .humidity }}{{ $parts = $parts | append (printf "%.0f%% humidity" .) }}{{ end }}
{{ with .windspeedmph }}{{ $parts = $parts | append (printf "wind %.1f mph" .) }}{{ end }}
{{ $desc = delimit $parts ", " }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
<title>{{ $title }}</title>
<meta property="og:title" content="{{ $title }}">
{{ with $desc }}<meta property="og:description" content="{{ . }}">{{ end }}
<meta property="og:url" content="https://adriano.fyi/whereami">
<meta property="og:type" content="website">
{{ end }}