Skip to content

Commit 58539cb

Browse files
committed
fetch latest in button
1 parent a4f72df commit 58539cb

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

docs/layouts/_partials/header/header.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,14 @@ <h5 class="offcanvas-title fw-bold" id="offcanvasNavMainLabel">{{ .Site.Params.T
143143

144144
<!-- Release Notes -->
145145
<div class="flex-grow-1 d-none d-lg-flex justify-content-center align-items-center">
146+
{{ $url := "https://api.github.com/repos/DefectDojo/django-DefectDojo/releases/latest" }}
147+
{{ $resource := resources.GetRemote $url }}
148+
149+
{{ if $resource }}
150+
{{ $release := $resource | transform.Unmarshal }}
151+
152+
{{ $release.name }} |
153+
{{ end }}
146154
<a href="/changelog/pro_changelog/">
147155
<button type="button" class="btn btn-link nav-link p-2 d-none d-lg-block" aria-label="Release Notes">
148156
<span class="fw-bold">Release Notes</span>

0 commit comments

Comments
 (0)