Skip to content

Commit 3d056b2

Browse files
HeyItsGilbertclaude
andcommitted
Add iCal (.ics) subscription feed to community calendar
Integrates hugo-theme-component-ical to generate a subscribable calendar feed at /calendar/calendar.ics. Events migrated from data/events.yaml to Hugo content pages, making them the single source of truth for both the HTML calendar view and the ICS feed. - Initialize Hugo modules and import finkregh/hugo-theme-component-ical@v0.11.3 - Add Calendar output format (text/calendar) scoped to the calendar section - Migrate 3 events to content/calendar/ with RFC 5545 frontmatter fields - Update calendar.html to read from .RegularPages instead of site.Data.events - Add Subscribe (.ics) button and <link rel=alternate> discovery header - Override header.ics and event.ics partials for Hugo 0.155 compatibility - Override prop_description.ics to fix DESCRIPTION/LOCATION line merging Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent b7c749b commit 3d056b2

12 files changed

Lines changed: 127 additions & 53 deletions

File tree

content/calendar/_index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
title: "Community Calendar"
33
description: "Upcoming conferences, meetups, and community events for PowerShell professionals."
44
layout: "calendar"
5+
outputs:
6+
- HTML
7+
- Calendar
58
---

content/calendar/psconfeu-2026.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: "PSConfEU 2026"
3+
startDate: "2026-06-17"
4+
endDate: "2026-06-20"
5+
where: "Prague, Czech Republic"
6+
externalUrl: "https://psconf.eu"
7+
virtual: false
8+
---
9+
Europe's largest PowerShell conference. Expert-led sessions on automation, DevOps, security, and cloud management.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: "SQL Saturday Baton Rouge 2026"
3+
startDate: "2026-08-01"
4+
where: "Baton Rouge, LA"
5+
externalUrl: "https://sqlsaturday.com/baton-rouge/"
6+
virtual: false
7+
---
8+
A free community event featuring sessions on SQL Server, PowerShell, and data platform technologies.

content/calendar/summit-2026.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: "PowerShell + DevOps Global Summit 2026"
3+
startDate: "2026-04-13"
4+
endDate: "2026-04-16"
5+
where: "Bellevue, WA"
6+
externalUrl: "https://powershellsummit.org"
7+
virtual: false
8+
---
9+
The premier PowerShell and automation conference. Deep technical sessions, hands-on workshops, and community networking.

data/events.yaml

Lines changed: 0 additions & 33 deletions
This file was deleted.

go.mod

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module github.com/PowerShellOrg/PowerShellOrgWebsite
2+
3+
go 1.22.2
4+
5+
require github.com/finkregh/hugo-theme-component-ical v0.11.3 // indirect

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github.com/finkregh/hugo-theme-component-ical v0.11.3 h1:jyHak274hgvbwWKD/LX1x3sWFQ1IwHAj9bWpNh1qbig=
2+
github.com/finkregh/hugo-theme-component-ical v0.11.3/go.mod h1:6EFHEOW6dsEUWQB0bPnSHq6tYYNpQQ9pRu0hy8ZZKNE=

hugo.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ baseURL: 'https://powershell.org'
22
languageCode: 'en-us'
33
title: 'PowerShell.org - Welcome Automaters!'
44
theme: 'powershell-community'
5+
timeZone: UTC
56

67
# Enable RSS feeds
78
enableRSSFeed: true
@@ -96,7 +97,28 @@ params:
9697

9798
# Analytics (GitHub Pages compatible)
9899
google_analytics: ""
100+
101+
ical:
102+
timezone: UTC
99103

104+
module:
105+
imports:
106+
- path: github.com/finkregh/hugo-theme-component-ical
107+
108+
mediaTypes:
109+
text/calendar:
110+
suffixes:
111+
- ics
112+
113+
outputFormats:
114+
Calendar:
115+
baseName: calendar
116+
mediaType: text/calendar
117+
isPlainText: true
118+
permalinkable: true
119+
suffix: ics
120+
protocol: https://
121+
100122
# Output formats
101123
outputs:
102124
home:

layouts/_partials/event.ics

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{{- /* Override of component event.ics — uses .Site.Language.Lang instead of .Locale (requires Hugo 0.159+) */ -}}
2+
{{- if or (eq hugo.Environment "development") (eq hugo.Environment "debug") }}{{ warnidf "debug-partial-used" "Partial used: %s" templates.Current.Name }}{{ end -}}
3+
{{- $timezone := partial "ical/get_timezone.ics" . -}}
4+
{{- $lang := .Site.Language.Lang -}}
5+
{{- $endDate := "" -}}
6+
{{- if .Params.endDate -}}
7+
{{- $endDate = (time.AsTime .Params.endDate $timezone) | time.In $timezone -}}
8+
{{- end -}}
9+
{{- with dict `` `
10+
` "description" (dict "text" .Plain "lang" $lang) `` `
11+
` "summary" (dict "text" .Title "lang" $lang) `` `
12+
` "eventStart" (dict "dateTime" ((time.AsTime .Params.startDate $timezone) | time.In $timezone) "timeZoneID" $timezone) `` `
13+
` "eventEnd" (cond (ne $endDate "") (dict "dateTime" $endDate "timeZoneID" $timezone) nil) `` `
14+
` "location" (dict "text" (or .Params.where .Params.location) "lang" $lang) `` `
15+
` "url" (or .Params.externalUrl ((.OutputFormats.Get "HTML").Permalink)) `` `
16+
` "contact" (cond (and .Params.orga .Params.orgaEmail) (dict "text" (printf "%s: %s" .Params.orga .Params.orgaEmail) "lang" $lang) nil) `` `
17+
` "color" "7C3AED" `` `
18+
` "status" (cond (.Params.cancelled | default false) "CANCELLED" "CONFIRMED") `` `
19+
` "uid" .File.UniqueID `` `
20+
` "timestamp" .Date `` `
21+
` "created" .Date `` `
22+
` "lastmod" .Lastmod `` `
23+
` "recurrenceRule" .Params.recurrenceRule `` `
24+
` "_rruleTimezone" $timezone `` `
25+
` -}}{{ partial "ical/comp_event.ics" . }}
26+
{{ end -}}

layouts/_partials/header.ics

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{{- if or (eq hugo.Environment "development") (eq hugo.Environment "debug") }}{{ warnidf "debug-partial-used" "Partial used: %s" templates.Current.Name }}{{ end -}}
2+
{{/* Override of component header.ics — uses .Site.Language.Lang instead of .Locale (requires Hugo 0.159+) */}}
3+
{{ with dict `` `
4+
` "name" (dict "text" "PowerShell.org Community Calendar" "lang" .Site.Language.Lang) `` `
5+
` "description" (dict "text" "Upcoming PowerShell conferences, meetups, and community events." "lang" .Site.Language.Lang) `` `
6+
` "url" (.OutputFormats.Get "HTML").Permalink `` `
7+
` "color" "7C3AED" `` `
8+
` "uid" .File.UniqueID `` `
9+
` "lastmod" .Lastmod `` `
10+
` "source" (.OutputFormats.Get "Calendar").Permalink `` `
11+
` -}}{{- partial "ical/cal_props.ics" . }}{{ end }}

0 commit comments

Comments
 (0)