From 99a506481c0a99d8dd988ed881bc8df0a3390951 Mon Sep 17 00:00:00 2001 From: Stefan Schlott Date: Tue, 27 Feb 2018 09:31:12 +0100 Subject: [PATCH] Calendar: Relative links on website, absolute in ical --- content/_data/stammtisch.yaml | 144 ++++++++++++++++----------------- content/ical.txt | 6 +- content/imprint.md | 4 +- nanoc.yaml | 4 +- scripts/generate-stammtisch.rb | 2 +- 5 files changed, 82 insertions(+), 78 deletions(-) diff --git a/content/_data/stammtisch.yaml b/content/_data/stammtisch.yaml index 49b095b4..6e5e39e1 100644 --- a/content/_data/stammtisch.yaml +++ b/content/_data/stammtisch.yaml @@ -3,432 +3,432 @@ events: - title: CCCS-Stammtisch (Zadu-Bar) startdate: 2016-01-05 18:00:00.000000000 +01:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: zadu - title: CCCS-Stammtisch (shackspace) startdate: 2016-01-20 18:00:00.000000000 +01:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Zadu-Bar) startdate: 2016-02-02 18:00:00.000000000 +01:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: zadu - title: CCCS-Stammtisch (shackspace) startdate: 2016-02-17 18:00:00.000000000 +01:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Zadu-Bar) startdate: 2016-03-01 18:00:00.000000000 +01:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: zadu - title: CCCS-Stammtisch (shackspace) startdate: 2016-03-16 18:00:00.000000000 +01:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Zadu-Bar) startdate: 2016-04-05 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: zadu - title: CCCS-Stammtisch (shackspace) startdate: 2016-04-20 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Zadu-Bar) startdate: 2016-05-03 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: zadu - title: CCCS-Stammtisch (shackspace) startdate: 2016-05-18 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Zadu-Bar) startdate: 2016-06-07 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: zadu - title: CCCS-Stammtisch (shackspace) startdate: 2016-06-15 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Zadu-Bar) startdate: 2016-07-05 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: zadu - title: CCCS-Stammtisch (shackspace) startdate: 2016-07-20 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Zadu-Bar) startdate: 2016-08-02 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: zadu - title: CCCS-Stammtisch (shackspace) startdate: 2016-08-17 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Zadu-Bar) startdate: 2016-09-06 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: zadu - title: CCCS-Stammtisch (shackspace) startdate: 2016-09-21 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Zadu-Bar) startdate: 2016-10-04 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: zadu - title: CCCS-Stammtisch (shackspace) startdate: 2016-10-19 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Zadu-Bar) startdate: 2016-11-01 18:00:00.000000000 +01:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: zadu - title: CCCS-Stammtisch (shackspace) startdate: 2016-11-16 18:00:00.000000000 +01:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Zadu-Bar) startdate: 2016-12-06 18:00:00.000000000 +01:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: zadu - title: CCCS-Stammtisch (shackspace) startdate: 2016-12-21 18:00:00.000000000 +01:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Zadu-Bar) startdate: 2017-01-03 18:00:00.000000000 +01:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: zadu - title: CCCS-Stammtisch (shackspace) startdate: 2017-01-18 18:00:00.000000000 +01:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Zadu-Bar) startdate: 2017-02-07 18:00:00.000000000 +01:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: zadu - title: CCCS-Stammtisch (shackspace) startdate: 2017-02-15 18:00:00.000000000 +01:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Zadu-Bar) startdate: 2017-03-07 18:00:00.000000000 +01:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: zadu - title: CCCS-Stammtisch (shackspace) startdate: 2017-03-15 18:00:00.000000000 +01:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Zadu-Bar) startdate: 2017-04-04 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: zadu - title: CCCS-Stammtisch (shackspace) startdate: 2017-04-19 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Lichtblick) startdate: 2017-05-02 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: lichtblick - title: CCCS-Stammtisch (shackspace) startdate: 2017-05-17 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (letztes Mal Zadu-Bar!) startdate: 2017-06-06 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: zadu - title: CCCS-Stammtisch (shackspace) startdate: 2017-06-21 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Lichtblick) startdate: 2017-07-04 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: lichtblick - title: CCCS-Stammtisch (shackspace) startdate: 2017-07-19 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Lichtblick) startdate: 2017-08-01 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: lichtblick - title: CCCS-Stammtisch (shackspace) startdate: 2017-08-16 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Lichtblick) startdate: 2017-09-05 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: lichtblick - title: CCCS-Stammtisch (shackspace) startdate: 2017-09-20 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Lichtblick) startdate: 2017-10-03 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: lichtblick - title: CCCS-Stammtisch (shackspace) startdate: 2017-10-18 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Lichtblick) startdate: 2017-11-07 18:00:00.000000000 +01:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: lichtblick - title: CCCS-Stammtisch (shackspace) startdate: 2017-11-15 18:00:00.000000000 +01:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Lichtblick) startdate: 2017-12-05 18:00:00.000000000 +01:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: lichtblick - title: CCCS-Stammtisch (shackspace) startdate: 2017-12-20 18:00:00.000000000 +01:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Lichtblick) startdate: 2018-01-02 18:00:00.000000000 +01:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: lichtblick - title: CCCS-Stammtisch (shackspace) startdate: 2018-01-17 18:00:00.000000000 +01:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Lichtblick) startdate: 2018-02-06 18:00:00.000000000 +01:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: lichtblick - title: CCCS-Stammtisch (shackspace) startdate: 2018-02-21 18:00:00.000000000 +01:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Lichtblick) startdate: 2018-03-06 18:00:00.000000000 +01:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: lichtblick - title: CCCS-Stammtisch (shackspace) startdate: 2018-03-21 18:00:00.000000000 +01:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Lichtblick) startdate: 2018-04-03 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: lichtblick - title: CCCS-Stammtisch (shackspace) startdate: 2018-04-18 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Lichtblick) startdate: 2018-05-01 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: lichtblick - title: CCCS-Stammtisch (shackspace) startdate: 2018-05-16 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Lichtblick) startdate: 2018-06-05 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: lichtblick - title: CCCS-Stammtisch (shackspace) startdate: 2018-06-20 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Lichtblick) startdate: 2018-07-03 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: lichtblick - title: CCCS-Stammtisch (shackspace) startdate: 2018-07-18 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Lichtblick) startdate: 2018-08-07 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: lichtblick - title: CCCS-Stammtisch (shackspace) startdate: 2018-08-15 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Lichtblick) startdate: 2018-09-04 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: lichtblick - title: CCCS-Stammtisch (shackspace) startdate: 2018-09-19 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Lichtblick) startdate: 2018-10-02 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: lichtblick - title: CCCS-Stammtisch (shackspace) startdate: 2018-10-17 18:00:00.000000000 +02:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Lichtblick) startdate: 2018-11-06 18:00:00.000000000 +01:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: lichtblick - title: CCCS-Stammtisch (shackspace) startdate: 2018-11-21 18:00:00.000000000 +01:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack - title: CCCS-Stammtisch (Lichtblick) startdate: 2018-12-04 18:00:00.000000000 +01:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: lichtblick - title: CCCS-Stammtisch (shackspace) startdate: 2018-12-19 18:00:00.000000000 +01:00 duration: 4h - url: https://www.cccs.de/about/stammtisch/ + url: /about/stammtisch/ location: location: shack diff --git a/content/ical.txt b/content/ical.txt index d5b284a4..19377338 100644 --- a/content/ical.txt +++ b/content/ical.txt @@ -25,7 +25,11 @@ cal = RiCal.Calendar do |cal| end event.uid = Digest::SHA1.hexdigest("#{e[:startdate]}#{e[:title]}") if e[:url] - event.url = e[:url] + if e[:url].start_with?('/') + event.url = "#{@config[:base_url]}#{e[:url]}" + else + event.url = e[:url] + end elsif e.identifier.start_with?('/events') or e.identifier.start_with?('/activities') event.url = "#{@config[:base_url]}#{e.path}" event.uid = Digest::SHA1.hexdigest("#{@config[:base_url]}#{e.path}") diff --git a/content/imprint.md b/content/imprint.md index 47a64bb8..2c8bb296 100644 --- a/content/imprint.md +++ b/content/imprint.md @@ -53,8 +53,8 @@ src="/img/cc-by-nc-sa.png" />
Inhalte von http://www.cccs.de/ unter einer https://www.cccs.de/ unter einer Creative Commons Namensnennung - Nicht-kommerziell - Weitergabe unter gleichen diff --git a/nanoc.yaml b/nanoc.yaml index b360f804..d2889524 100644 --- a/nanoc.yaml +++ b/nanoc.yaml @@ -88,10 +88,10 @@ watcher: notify_on_compilation_failure: true -base_url: http://www.cccs.de +base_url: https://www.cccs.de author_name: CCCS author_email: webmaster@cccs.de -author_uri: http://www.cccs.de/ +author_uri: https://www.cccs.de/ twitter_file: content/_data/twitter.csv data_dir: /data diff --git a/scripts/generate-stammtisch.rb b/scripts/generate-stammtisch.rb index 1ae44cea..ad3e00b2 100755 --- a/scripts/generate-stammtisch.rb +++ b/scripts/generate-stammtisch.rb @@ -14,7 +14,7 @@ def event(day, dayoffset, title, location) 'title' => title, 'startdate' => startDate, 'duration' => '4h', - 'url' => 'https://www.cccs.de/about/stammtisch/', + 'url' => '/about/stammtisch/', 'location' => { 'location' => location }