theme: Add current Hugo version to the header

* Then I don't have to check the source to see if we're at latest.
* Also, it has some promo value.
This commit is contained in:
Bjørn Erik Pedersen 2025-05-01 16:37:56 +02:00
parent 37aa24ac5e
commit 8cc589c3a1
No known key found for this signature in database

View File

@ -22,6 +22,23 @@
>
{{ end }}
<div class="hidden 2xl:block ml-8 text-xs text-gray-400 dark:text-gray-400">
{{ with hugo.Version }}
Built with Hugo
{{ if strings.Contains . "-DEV" }}
v{{ . }}
{{ else }}
<a
class="text-blue-600 hover:text-blue-500 ml-1"
href="{{ printf `https://github.com/gohugoio/hugo/releases/tag/v%s` . }}"
>v{{ . }}</a
>
{{ end }}
{{ end }}
</div>
</div>
<div class="-my-5 pl-2 grow-0">
@ -29,7 +46,7 @@
{{ partial "layouts/search/input.html" . }}
</div>
<div
class="relative ml-0 md:ml-8 flex basis-0 justify-end gap-0 sm:gap-1 xl:grow-1">
class="relative ml-0 md:ml-8 flex content-center basis-0 justify-end gap-0 sm:gap-1 xl:grow-1">
{{/* QR code. */}}
{{ partial "layouts/header/qr.html" . }}
{{/* Theme selector. */}}