fixed wrong generated URLs
All checks were successful
Build and deploy static pages / build-and-push (push) Successful in 14s
All checks were successful
Build and deploy static pages / build-and-push (push) Successful in 14s
This commit is contained in:
@@ -4,7 +4,16 @@
|
||||
<h1>{{ .Title }}</h1>
|
||||
</header>
|
||||
|
||||
<div id="pa-calendar" data-events="{{ .Params.events | jsonify }}"></div>
|
||||
{{- /* Event urls are stored root-relative; strip the leading slash so relURL
|
||||
prepends the baseURL subpath, keeping event clicks working when the site
|
||||
is served from a subdirectory. */ -}}
|
||||
{{- $events := slice }}
|
||||
{{- range .Params.events }}
|
||||
{{- $e := . }}
|
||||
{{- with .url }}{{ $e = merge $e (dict "url" (strings.TrimPrefix "/" . | relURL)) }}{{ end }}
|
||||
{{- $events = $events | append $e }}
|
||||
{{- end }}
|
||||
<div id="pa-calendar" data-events="{{ $events | jsonify }}"></div>
|
||||
|
||||
{{- if .Content }}
|
||||
<div class="md-content">
|
||||
|
||||
Reference in New Issue
Block a user