Skip to content

Commit 8cc589c

Browse files
committed
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.
1 parent 37aa24a commit 8cc589c

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

layouts/_partials/layouts/header/header.html

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,31 @@
2222
>
2323
{{ end }}
2424

25+
26+
<div class="hidden 2xl:block ml-8 text-xs text-gray-400 dark:text-gray-400">
27+
{{ with hugo.Version }}
28+
29+
Built with Hugo
30+
{{ if strings.Contains . "-DEV" }}
31+
v{{ . }}
32+
{{ else }}
33+
<a
34+
class="text-blue-600 hover:text-blue-500 ml-1"
35+
href="{{ printf `https://github.com/gohugoio/hugo/releases/tag/v%s` . }}"
36+
>v{{ . }}</a
37+
>
38+
{{ end }}
39+
{{ end }}
40+
41+
</div>
2542
</div>
2643

2744
<div class="-my-5 pl-2 grow-0">
2845
{{/* Search. */}}
2946
{{ partial "layouts/search/input.html" . }}
3047
</div>
3148
<div
32-
class="relative ml-0 md:ml-8 flex basis-0 justify-end gap-0 sm:gap-1 xl:grow-1">
49+
class="relative ml-0 md:ml-8 flex content-center basis-0 justify-end gap-0 sm:gap-1 xl:grow-1">
3350
{{/* QR code. */}}
3451
{{ partial "layouts/header/qr.html" . }}
3552
{{/* Theme selector. */}}

0 commit comments

Comments
 (0)