fix: several syntax errors
This commit is contained in:
parent
c7d353502b
commit
82381276b2
1 changed files with 7 additions and 7 deletions
|
@ -1,24 +1,24 @@
|
||||||
{{- $chapters := slice -}}
|
{{- $chapters := slice -}}
|
||||||
{{- with .Params.chapters -}}
|
{{- with .Params.chapters -}}
|
||||||
{{- range . -}}
|
{{- range . -}}
|
||||||
{{- $start_time_value := printf "%.3f" .start_time | cast.ToFloat -}}
|
{{- $start_time_value := printf "%.3f" (cast.ToFloat .start_time ) | cast.ToFloat -}}
|
||||||
{{- $entry := dict "startTime" $start_time_value "title" .title -}}
|
{{- $entry := dict "startTime" $start_time_value "title" .title -}}
|
||||||
{{- with .image -}}
|
{{- with .image -}}
|
||||||
{{- $entry = collections.Merge $entry (dict "img" .image) -}}
|
{{- $entry = collections.Merge $entry (dict "img" .) -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- with .url -}}
|
{{- with .url -}}
|
||||||
{{- $entry = collections.Merge $entry (dict "url" .url) -}}
|
{{- $entry = collections.Merge $entry (dict "url" .) -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- with .toc -}}
|
{{- with .toc -}}
|
||||||
{{- $entry = collections.Merge $entry (dict "toc" .toc) -}}
|
{{- $entry = collections.Merge $entry (dict "toc" .) -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- with .end_time -}}
|
{{- with .end_time -}}
|
||||||
{{- $end_time_value := printf "%.3f" .end_time | cast.ToFloat -}}
|
{{- $end_time_value := printf "%.3f" (cast.ToFloat . ) | cast.ToFloat -}}
|
||||||
{{- $entry = collections.Merge $entry (dict "endTime" $end_time_value) -}}
|
{{- $entry = collections.Merge $entry (dict "endTime" $end_time_value) -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- with .location -}}
|
{{- with .location -}}
|
||||||
{{- $name := collections.Index .location "name" -}}
|
{{- $name := collections.Index . "name" -}}
|
||||||
{{- $geo := collections.Index .location "geo" -}}
|
{{- $geo := collections.Index . "geo" -}}
|
||||||
{{- $entry = collections.Merge $entry (dict "location" (dict "name" $name "geo" $geo)) -}}
|
{{- $entry = collections.Merge $entry (dict "location" (dict "name" $name "geo" $geo)) -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- $chapters = collections.Append $entry $chapters -}}
|
{{- $chapters = collections.Append $entry $chapters -}}
|
||||||
|
|
Loading…
Reference in a new issue