Skip to content

Commit a0deb90

Browse files
authored
Also make the community events list data-driven (public-transport#1910)
* Highlight upcoming talks As the website is rebuild daily already anyway, this will automatically update itself. * Also make the community events list data-driven Easier to maintain and automatically drops past events.
1 parent 1390cdd commit a0deb90

4 files changed

Lines changed: 63 additions & 5 deletions

File tree

website/content/_index.html

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,8 @@ <h2>Public Transport Coverage</h2>
5757

5858
<h2>Upcoming Events</h2>
5959
<p>Want to meet the Transitous community in person? Some of us will be at the following events:</p>
60-
<ul>
61-
<li><a href="https://fosdem.org/2026">FOSDEM</a>, Jan 31-Feb 1 2026, Brussels, Belgium.</li>
62-
<li><a href="https://fossgis-konferenz.de/2026">FOSSGIS-Konferenz</a>, Mar 25-28, Göttingen, Germany.</li>
63-
<li><a href="https://wiki.openstreetmap.org/wiki/State_of_the_Map_2026">State of the Map</a>, Aug 28-30, Paris, France.</li>
64-
</ul>
60+
61+
{{< community-events >}}
6562

6663
<h2>Conference Talks and Presentations</h2>
6764
<p>Looking for an overview of how this project works? There are several public talks from conferences and meetups that you can watch.</p>

website/data/communityevents.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[
2+
{
3+
"name": "FOSDEM 2026",
4+
"link": "https://fosdem.org/2026",
5+
"startDate": "2026-01-31",
6+
"endDate": "2026-02-01",
7+
"location": "Brussels, Belgium"
8+
},
9+
{
10+
"name": "OSM Hack Weekend Karlsruhe",
11+
"link": "https://wiki.openstreetmap.org/wiki/Karlsruhe_Hack_Weekend_February_2026",
12+
"startDate": "2026-02-21",
13+
"endDate": "2026-02-22",
14+
"location": "Karlsruhe, Germany"
15+
},
16+
{
17+
"name": "FOSSGIS-Konferenz 2026",
18+
"link": "https://fossgis-konferenz.de/2026",
19+
"startDate": "2026-03-25",
20+
"endDate": "2026-03-28",
21+
"location": "Göttingen, Germany"
22+
},
23+
{
24+
"name": "State of the Map 2026",
25+
"link": "https://wiki.openstreetmap.org/wiki/State_of_the_Map_2026",
26+
"startDate": "2026-08-28",
27+
"endDate": "2026-08-30",
28+
"location": "Paris, France"
29+
},
30+
{
31+
"name": "Open Transport Community Conference 2026",
32+
"link": "https://open-transport.org",
33+
"startDate": "2026-10-06",
34+
"endDate": "2026-10-09",
35+
"location": "Bern, Switzerland"
36+
}
37+
]
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2026 Volker Krause <vkrause@kde.org>
3+
SPDX-License-Identifier: AGPL-3.0-or-later
4+
-->
5+
6+
<ul>
7+
{{ range $event := $.Site.Data.communityevents }}
8+
{{ $eventEnd := time.AsTime $event.endDate }}
9+
{{ if gt (time.Now) $eventEnd }}
10+
{{ continue }}
11+
{{ end }}
12+
<li>
13+
<a href="{{ .link }}">{{ .name }}</a> — {{ .startDate | time.Format ":date_medium" }}
14+
{{ if ne .startDate .endDate }}
15+
to {{ .endDate | time.Format ":date_medium" }}
16+
{{ end }}
17+
in {{ .location }}
18+
</li>
19+
{{ end }}
20+
</ul>

website/layouts/shortcodes/talks.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88
{{ range $talk := $.Site.Data.talks }}
99
{{ $year := (strings.Substr $talk.time 0 4) }}
10+
{{ $talkTime := time.AsTime $talk.time }}
11+
{{ if lt (time.Now) $talkTime }}
12+
{{ $year = "Upcoming" }}
13+
{{ end }}
1014
{{ if ne $year $lastYear }}
1115
{{ if ne $lastYear "" }}
1216
</ul>

0 commit comments

Comments
 (0)