From 01625aa2e080a08062be35dd907b8fc2b680f016 Mon Sep 17 00:00:00 2001 From: paspo Date: Tue, 1 Oct 2024 21:09:47 +0200 Subject: [PATCH] fix validar warnings --- layouts/_default/home.calendar.ics | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/layouts/_default/home.calendar.ics b/layouts/_default/home.calendar.ics index 98d4042..8fc04a4 100644 --- a/layouts/_default/home.calendar.ics +++ b/layouts/_default/home.calendar.ics @@ -5,9 +5,7 @@ X-WR-CALNAME:BgLUG Events Calendar X-WR-TIMEZONE:Europe/Rome CALSCALE:GREGORIAN METHOD:PUBLISH - -{{range where .Site.Pages ".Page.Params.add_to_ics" true -}} - +{{- range where .Site.Pages ".Page.Params.add_to_ics" true -}} {{- $location := "" -}} {{- $locations := .Params.locations -}} {{- with (eq (printf "%T" $locations ) "string" ) -}} @@ -16,10 +14,9 @@ METHOD:PUBLISH {{- with (eq (printf "%T" $locations ) "[]string" ) -}} {{- $location = (index $locations 0) -}} {{- end -}} -{{ if .Params.location_ics }} +{{- if .Params.location_ics }} {{- $location = .Params.location_ics }} {{- end }} - BEGIN:VEVENT SUMMARY:{{.Title}} ORGANIZER;{{ .Site.Param "ics.organizer" }} @@ -35,9 +32,7 @@ URL:{{ .Permalink }} {{- $d := time.AsTime .Date }} {{- $duration := .Params.duration | default "1h" }} DTEND;TZID=Europe/Rome:{{dateFormat "20060102T150405Z" ($d.Add (time.ParseDuration $duration) ) }} -{{ end -}} +{{- end -}} END:VEVENT - -{{end -}} - +{{- end -}} END:VCALENDAR