From b02e2a0c4ab5d7933535ab06f100778fac118301 Mon Sep 17 00:00:00 2001 From: paspo Date: Mon, 30 Sep 2024 19:24:15 +0200 Subject: [PATCH] supporto ics per tutte le pagine --- config.yml | 4 ++-- content/events/_index.en.md | 13 ------------- content/events/_index.it.md | 13 ------------- docker/rootfs/etc/nginx/http.d/default.conf | 2 +- .../{events/list.ics => _default/home.calendar.ics} | 2 +- 5 files changed, 4 insertions(+), 30 deletions(-) delete mode 100644 content/events/_index.en.md delete mode 100644 content/events/_index.it.md rename layouts/{events/list.ics => _default/home.calendar.ics} (94%) diff --git a/config.yml b/config.yml index c0ae508..ab38084 100644 --- a/config.yml +++ b/config.yml @@ -47,7 +47,7 @@ params: - title: Events Caledar icon: fa-calendar-alt pack: solid - url: https://bglug.it/it/eventi/index.ics + url: https://bglug.it/it/index.ics - title: Facebook icon: fa-facebook-f pack: brands @@ -230,6 +230,7 @@ outputs: home: - html - rss + - calendar page: - html - rss @@ -237,7 +238,6 @@ outputs: - rss section: - html - - calendar - rss taxonomy: - html diff --git a/content/events/_index.en.md b/content/events/_index.en.md deleted file mode 100644 index bbbe92b..0000000 --- a/content/events/_index.en.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -type: section -title: Events -#description: "TODO: please fill this with a description" -sidebar_right: sidebar-eventi -output: - - calendar: - mediaType: text/calendar -mediaTypes: - text/calendar: - suffixes: - - ics ---- diff --git a/content/events/_index.it.md b/content/events/_index.it.md deleted file mode 100644 index 236c850e..0000000 --- a/content/events/_index.it.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -type: section -title: Eventi -#description: "TODO: non so come descrivere la sezione eventi" -sidebar_right: sidebar-eventi -output: - - calendar: - mediaType: text/calendar -mediaTypes: - text/calendar: - suffixes: - - ics ---- diff --git a/docker/rootfs/etc/nginx/http.d/default.conf b/docker/rootfs/etc/nginx/http.d/default.conf index 2bc5954..e481363 100644 --- a/docker/rootfs/etc/nginx/http.d/default.conf +++ b/docker/rootfs/etc/nginx/http.d/default.conf @@ -13,7 +13,7 @@ server { } location ~ /events/elenco/ { - try_files $uri /it/eventi/index.ics; + try_files $uri /it/index.ics; } location ~ ^/wp\-content/uploads/2008/02/Statuto\.pdf$ { diff --git a/layouts/events/list.ics b/layouts/_default/home.calendar.ics similarity index 94% rename from layouts/events/list.ics rename to layouts/_default/home.calendar.ics index 047cb0b..98d4042 100644 --- a/layouts/events/list.ics +++ b/layouts/_default/home.calendar.ics @@ -6,7 +6,7 @@ X-WR-TIMEZONE:Europe/Rome CALSCALE:GREGORIAN METHOD:PUBLISH -{{range .Pages -}} +{{range where .Site.Pages ".Page.Params.add_to_ics" true -}} {{- $location := "" -}} {{- $locations := .Params.locations -}}