{{- $shouldShowBirthdayBanner := false -}} {{- $now := time.Now -}} {{- with site.GetPage "page" "community/special/kubernetes-10th-birthday" -}} {{- if and (lt ( (.Param "display_date_start") | time.AsTime ) $now ) (gt ( (.Param "display_date_end") | time.AsTime ) ( $now.AddDate 0 0 1 ) ) -}} {{- $shouldShowBirthdayBanner = true -}} {{- warnf "%s" "It's Kubernetes' birthday, fingers crossed this renders OK" -}} {{- with resources.Get "images/k8s-10th-birthday.svg" -}} {{- else -}} {{- errorf "%s" "Birthday banner image missing" -}} {{- end -}} {{ end }} {{- end -}} {{- if $shouldShowBirthdayBanner -}} {{ "2014-06-06" | time.AsTime | time.Format ":date_long" }} {{- with site.GetPage "page" "community/special/kubernetes-10th-birthday" -}} {{- else -}} {{- errorf "%s" "10th Birthday content missing" -}} {{- end -}} {{ printf "%s-06-06" ( time.Format "2006" $now ) | time.AsTime | time.Format ":date_long" }} {{ T "k8s_birthday_show_original_content" }} {{- end -}} {{ .inner }}
{{ "2014-06-06" | time.AsTime | time.Format ":date_long" }}
{{ printf "%s-06-06" ( time.Format "2006" $now ) | time.AsTime | time.Format ":date_long" }}