mirror of https://github.com/istio/istio.io.git
Compensate for a Hugo bug when running on Windows. (#2919)
This commit is contained in:
parent
c57216f4d3
commit
35b41b1e20
|
|
@ -1,4 +1,10 @@
|
|||
{{ $dir_name := index (last 2 (split .Page.Dir "/" )) 0 }}
|
||||
|
||||
{{/* Compensate for a Hugo bug on Windows where it appends a \ on the output of .Page.Dir */}}
|
||||
{{ if (strings.HasSuffix $dir_name "\\") }}
|
||||
{{ $dir_name = slicestr $dir_name 0 (sub (len $dir_name) 1) }}
|
||||
{{ end }}
|
||||
|
||||
{{ $parts := split $dir_name "." }}
|
||||
|
||||
{{ $short_version := $dir_name }}
|
||||
|
|
|
|||
Loading…
Reference in New Issue