From 2c4e1cd660ee03e1fc9f2804487ae8c567d8d1e3 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Tue, 5 Mar 2024 08:12:38 +0200 Subject: Improve front matter "added" params Add missing ones and add the ability to show or hide the badge Fixes a few more 404 errors in the version picker --- site/layouts/_default/docs.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'site/layouts/_default/docs.html') diff --git a/site/layouts/_default/docs.html b/site/layouts/_default/docs.html index cbf06a554..a71e0f7b5 100644 --- a/site/layouts/_default/docs.html +++ b/site/layouts/_default/docs.html @@ -18,8 +18,9 @@
- {{- if .Page.Params.added -}} - Added in v{{ .Page.Params.added }} + {{- /* This is needed because we want to show the badge if show_badge isn't present or is set to false */ -}} + {{- if (or (and (.Page.Params.added) (not (isset .Page.Params.added "show_badge"))) (and (.Page.Params.added) (isset .Page.Params.added "show_badge") (not (eq .Page.Params.added.show_badge false)))) -}} + Added in v{{ .Page.Params.added.version }} {{- end -}} View on GitHub -- cgit v1.2.3