Skip to content

Commit 007851c

Browse files
committed
Layout für Kalender
1 parent e09a1f5 commit 007851c

File tree

5 files changed

+36
-7
lines changed

5 files changed

+36
-7
lines changed

.github/workflows/main.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,20 @@ jobs:
1919
sudo ln -s $(pwd)/hugo /usr/bin/hugo
2020
cd -
2121
22+
- name: Fetch calendar
23+
run: |
24+
pip install icalevents
25+
wget https://github.com/pka/ical2json/raw/main/ical_to_json.py
26+
python ical_to_json.py https://calendar.fossgis.de/fossgis-verein.ical >data/fossgis_verein.json
27+
2228
- name: Build site
2329
run: |
2430
hugo
2531
26-
- name: Rollout site
27-
env:
28-
SSH_KEY: ${{ secrets.SSH_KEY }}
29-
run: |
30-
eval $(ssh-agent -s)
31-
ssh-add - <<< "${SSH_KEY}"
32-
rsync --exclude=/w --delete -r -e "ssh -o StrictHostKeyChecking=no -p 22" public/ [email protected]:/
32+
# - name: Rollout site
33+
# env:
34+
# SSH_KEY: ${{ secrets.SSH_KEY }}
35+
# run: |
36+
# eval $(ssh-agent -s)
37+
# ssh-add - <<< "${SSH_KEY}"
38+
# rsync --exclude=/w --delete -r -e "ssh -o StrictHostKeyChecking=no -p 22" public/ [email protected]:/

content/aktivitäten/termine.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ title: "Vereinstermine"
44
# side:
55
# parent: Aktivitäten
66
# weight: 20
7+
layout: calendar
78
---
89

910

data/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fossgis_verein.json
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{{ define "title" }}
2+
{{ .Title }} &ndash; {{ .Site.Title }}
3+
{{ end }}
4+
5+
{{ define "main" }}
6+
<h1>{{ .Title }}</h1>
7+
{{ .Content }}
8+
9+
{{ if $.Site.Data.fossgis_verein }}
10+
<h2>Termine</h2>
11+
{{ partial "calendar.html" $.Site.Data.fossgis_verein }}
12+
{{ end }}
13+
{{ end }}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<div>
2+
<ul>
3+
{{ range . }}
4+
<li>{{ dateFormat "02.01.06" .start }}{{ if not .all_day }}
5+
{{ dateFormat "15:04" .start }}{{ end }}: {{ .summary }}</li>
6+
{{ end }}
7+
</ul>
8+
</div>

0 commit comments

Comments
 (0)