Fix current shortcode

rust
Elnu 3 years ago
parent 6e6fb4919c
commit 78878d2e28

@ -1,8 +1,8 @@
{{ $scratch := newScratch }}
{{ $scratch.Set "current" 0 }}
{{ range.Site.RegularPages }}
{{ if gt (int .File.TranslationBaseName) ($scratch.Get "current") }}
{{ $scratch.Set "current" (int .File.TranslationBaseName) }}
{{ end }}
{{ end }}
{{ $scratch.Get "current" }}
{{- $scratch := newScratch -}}
{{- $scratch.Set "current" 0 -}}
{{- range.Site.RegularPages -}}
{{- if gt (int .File.TranslationBaseName) ($scratch.Get "current") -}}
{{- $scratch.Set "current" (int .File.TranslationBaseName) -}}
{{- end -}}
{{- end -}}
{{- $scratch.Get "current" -}}
Loading…
Cancel
Save