From e0c3baefbf4f8181d640ebe15454d719149bcee5 Mon Sep 17 00:00:00 2001 From: Lars Bilke Date: Tue, 11 Jun 2024 16:08:54 +0200 Subject: [PATCH] [web] Shortcode-comments have an interesting syntax. See https://discourse.gohugo.io/t/how-to-comment-out-shortcodes-in-markdown/14893/10 --- web/layouts/shortcodes/dataFile.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/layouts/shortcodes/dataFile.html b/web/layouts/shortcodes/dataFile.html index 23e7a3a4596..19320fce93a 100644 --- a/web/layouts/shortcodes/dataFile.html +++ b/web/layouts/shortcodes/dataFile.html @@ -2,9 +2,9 @@ {{- $map := split . "." }} {{- $url := index $.Site.Data $map -}} {{- if $url -}} - {# Second parameter allows to get a version component, starting with index 1 #} + {{/*% Second parameter allows to get a version component, starting with index 1 % */}} {{- with $.Get 1 -}} - {# Start with index 1, subtract 1 to get zero-based index #} + {{/*% Start with index 1, subtract 1 to get zero-based index % */}} {{- $index := math.Sub . 1 -}} {{- $version_comps := split $url "." -}} {{- $url = index $version_comps $index -}}