mirror of https://github.com/istio/istio.io.git
Fix some mishandling of path separators, leading to problems on Windows. (#2920)
This commit is contained in:
parent
113f20692e
commit
06d546c52c
|
|
@ -1,10 +1,4 @@
|
|||
{{ $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 }}
|
||||
|
||||
{{ $dir_name := path.Base .Page.Dir }}
|
||||
{{ $parts := split $dir_name "." }}
|
||||
|
||||
{{ $short_version := $dir_name }}
|
||||
|
|
|
|||
|
|
@ -14,13 +14,11 @@
|
|||
<td><a title="{{ .Description }}" href="{{ .Permalink }}">{{- .Title -}}</a></td>
|
||||
|
||||
<td>
|
||||
{{ $current_template := split .Dir "/" | last 2 }}
|
||||
{{ $current_template := index $current_template 0 }}
|
||||
{{ $current_template := path.Base .Dir }}
|
||||
|
||||
{{ $adapters := "" }}
|
||||
{{ range $a := $adapterPages }}
|
||||
{{ $adapter_name := split $a.Dir "/" | last 2 }}
|
||||
{{ $adapter_name := index $adapter_name 0 }}
|
||||
{{ $adapter_name := path.Base $a.Dir }}
|
||||
|
||||
{{ $templates := split .Params.supported_templates "," }}
|
||||
{{ $templates := sort $templates }}
|
||||
|
|
|
|||
Loading…
Reference in New Issue