From 73c67c0d66c83cf3e6c835d165dabcdf80a1d013 Mon Sep 17 00:00:00 2001 From: Toshaan Bharvani Date: Sat, 27 Mar 2021 03:12:07 +0100 Subject: [PATCH] add latest version on top of single spec page Signed-off-by: Toshaan Bharvani --- .../layouts/specifications/single.html | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/themes/openpowerfoundation/layouts/specifications/single.html b/themes/openpowerfoundation/layouts/specifications/single.html index 5a8fb88..2b95d32 100644 --- a/themes/openpowerfoundation/layouts/specifications/single.html +++ b/themes/openpowerfoundation/layouts/specifications/single.html @@ -2,6 +2,9 @@ {{ partial "navbar.html" . }} +{{ $filename := .File.BaseFileName }} +{{ $datafile := index $.Site.Data.specifications $filename }} +
@@ -11,6 +14,19 @@

+
+
 
+
+ {{ if $datafile.versions }} + {{ range last 1 $datafile.versions }} + Latest version {{ .number }} + {{ end }} + {{ end }} +
+
+
+
 
+
 
@@ -25,8 +41,7 @@ {{ end }}
- {{ $filename := .File.BaseFileName }} - {{ $datafile := index $.Site.Data.specifications $filename }} + {{ if $datafile.versions }}