--- {{ $today := now.UTC.Truncate (time.Duration "hour" 24) -}} {{ $tomorrow := $today.Add (time.Duration "hour" 24) -}} {{ $numSameDayEntries := len (where (where (where .Site.RegularPages.ByTitle "Section" "entry") "Date" "ge" $today) "Date" "lt" $tomorrow) -}} {{ $entryDate := $today.Add (time.Duration "second" $numSameDayEntries) -}} {{ if eq $entryDate $tomorrow -}} {{ errorf "Too many entries in one day!" }} {{ end -}} title: "{{ replace .Name "-" " " | title }}" date: {{ $entryDate.Format "2006-01-02T15:04:05Z" }} draft: false ---