Skip to content
Snippets Groups Projects
Unverified Commit e0c3baef authored by Lars Bilke's avatar Lars Bilke
Browse files

[web] Shortcode-comments have an interesting syntax.

parent e5ddf17d
No related branches found
No related tags found
No related merge requests found
......@@ -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 -}}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment