Remove KCD UK

Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
Marcus Noble 2024-10-27 13:45:15 +00:00
parent b9981f35ea
commit 5b0c85711f
Signed by: AverageMarcus
GPG Key ID: B8F2DB8A7AEBAF78
2 changed files with 15 additions and 7 deletions

View File

@ -139,13 +139,6 @@ badges:
url: https://www.credly.com/badges/cd63e887-72ac-49b0-8322-a4062d86d997/public_url
events:
- date: "2024-10-22"
humanDate: "October 22nd - 23rd, 2024"
url: https://community.cncf.io/events/details/cncf-kcd-uk-presents-kubernetes-community-days-uk-london-2024/
eventName: Kubernetes Community Days UK
details:
- name: "From Fragile to Resilient: Using Admission Policies to Strengthen Kubernetes"
type: Talk
- date: "2024-11-10"
humanDate: "November 10th - 11th, 2024"
url: https://cloud-native.rejekts.io/

15
main.go
View File

@ -9,6 +9,7 @@ import (
"os"
"path"
"strings"
"time"
"gopkg.in/yaml.v2"
)
@ -36,6 +37,8 @@ func main() {
panic(err)
}
// Set up "slugs" that can be used as redirects to social media accounts
// E.g. https://marcusnoble.com/mastodon -> https://k8s.social/@Marcus
for _, l := range data["social"].([]interface{}) {
link := l.(map[interface{}]interface{})
if link["slug"] != "" {
@ -43,6 +46,18 @@ func main() {
}
}
// Filter out any events that have passed already
futureEvents := []map[interface{}]interface{}{}
dateLayout := "2006-01-02"
for _, e := range data["events"].([]interface{}) {
event := e.(map[interface{}]interface{})
t, err := time.Parse(dateLayout, event["date"].(string))
if err == nil && time.Now().Before(t) {
futureEvents = append(futureEvents, event)
}
}
data["events"] = futureEvents
funcMap := template.FuncMap(map[string]interface{}{
"join": func(objs []interface{}, key, joiner string) template.HTML {
vals := []string{}