Merge pull request #22223 from sftim/20200630_disable_upcoming_events

(Temporarily) disable upcoming events for live site
pull/22001/head
Kubernetes Prow Robot 2020-06-30 11:34:06 -07:00 committed by GitHub
commit a325ddb45b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 13 deletions

View File

@ -2,16 +2,4 @@
{{/* Setting external resource based on whether hugo is running locally or public */}}
{{ if .Site.IsServer }}
{{ $jurl := printf "" $date }}
{{ else }}
{{ $jurl := printf "https://www.googleapis.com/calendar/v3/calendars/nt2tcnbtbied3l6gi2h29slvc0%%40group.calendar.google.com/events?orderBy=startTime&singleEvents=true&%s&key=AIzaSyAST-sCyPJzMQJSl6_vRPW9r4DNLPaDIyM" $date }}
{{ $dataJ := getJSON $jurl }}
{{ range first 4 $dataJ.items }}
{{ $url := findRE "(http|ftp|https)://([\\w_-]+(?:(?:\\.[\\w_-]+)+))([\\w.,@?^=%&:/~+#-]*[\\w@?^=%&/~+#-])?" .description }}
{{ $url := index $url 0 }}
<div class="event"><a href="{{ safeHTML $url }}">{{ .summary }}</a> - {{ .location }} - {{ .start.date }}</div>
{{ end }}
{{ end }}
{{/* Disabled as this is breaking website builds */}}