Skip to content

Commit

Permalink
Merge pull request kubernetes#22223 from sftim/20200630_disable_upcom…
Browse files Browse the repository at this point in the history
…ing_events

(Temporarily) disable upcoming events for live site
  • Loading branch information
k8s-ci-robot authored Jun 30, 2020
2 parents 5f16ced + d5c74c0 commit a325ddb
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions layouts/shortcodes/upcoming-events.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 */}}

0 comments on commit a325ddb

Please sign in to comment.