-
-
Notifications
You must be signed in to change notification settings - Fork 281
Add meet.rss.php template #2447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
I think it would be great to have an RSS feed for it - will try to test it later this week (If nobody else gets to it before me). I also think such a filter would be cool for the ICAL, if possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can add city filter to meet controller, instead of checking in template. So we can fillter the upcoming events for all usages such as meet page, ical and rss.
// site/controllers/meet.php
if ($city = get('city')) {
$upcoming = $upcoming->filterBy('city', '!=', $city);
}
<?php endif ?> | ||
<guid>https://getkirby.com/meet#meetup-<?= $event->slug() ?></guid> | ||
<description><![CDATA[ | ||
<p><?= $event->datetime()->format('Y-m-d H:i') ?> (time zone <?= $event->timezone()->value() ?>)</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An idea format: 2025-05-16 18:00 GMT+02:00 (Europe/Berlin)
<?= $event->datetime()->format('Y-m-d H:s \G\M\TP') ?> (<?= $event->timezone() ?>)
<channel> | ||
<title>Kirby meetup calendar</title> | ||
<link>https://getkirby.com/meet</link> | ||
<description>Connect with other Kirby developers around the world or meet face-to-face at a local meetup.</description> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<description>Connect with other Kirby developers around the world or meet face-to-face at a local meetup.</description> | |
<description><?= $page->description() ?></description> |
?><?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"> | ||
<channel> | ||
<title>Kirby meetup calendar</title> | ||
<link>https://getkirby.com/meet</link> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<link>https://getkirby.com/meet</link> | |
<link><?= $page->url() ?></link> | |
<atom:link href="<?= $page->url() ?>.rss" rel="self" type="application/rss+xml" /> |
<?php | ||
/** | ||
* @var \Kirby\Cms\Pages $upcoming | ||
*/ | ||
|
||
header('Content-Type: application/rss+xml; charset=UTF-8'); | ||
|
||
?><?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<?php | |
/** | |
* @var \Kirby\Cms\Pages $upcoming | |
*/ | |
header('Content-Type: application/rss+xml; charset=UTF-8'); | |
?><?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"> | |
<?php | |
/** | |
* @var \Kirby\Cms\Page $page | |
* @var \Kirby\Cms\Pages $upcoming | |
*/ | |
header('Content-Type: application/rss+xml; charset=UTF-8'); | |
?> | |
<?php echo '<?xml version="1.0" encoding="utf-8" ?>' . "\n" ?> | |
<rss | |
version="2.0" | |
xmlns:content="http://purl.org/rss/1.0/modules/content/" | |
xmlns:wfw="http://wellformedweb.org/CommentAPI/" | |
xmlns:dc="http://purl.org/dc/elements/1.1/" | |
xmlns:atom="http://www.w3.org/2005/Atom" | |
> |
Description
At last night's Berlin meetup, my corner of the room chatted about the discoverability challenge for new meetup dates. The ICAL option does not necessarily suit everybody (and we weren't sure would our calendars even alert us about new additions). It would be very neat to have new meetups announced in my feed reader.
Summary of changes
This adds an RSS content representation of the
/meet
page, listing all upcoming events in the most minimal valid RSS format (ref.).In addition, it is possible to filter the feed by city:
https://getkirby.com/meet.rss?city=berlin
Reasoning
As the data is already available in a structured format, this use of Kirby's content representations feature opens an additional path to consume the calendar data. Also: 🧡 RSS!
Additional context
I don't have a working dev environment for getkirby.com, so while I validated the RSS markup in a mockup, the implementation is untested. I'd hope it is at least 99% production-ready and could serve as a base for a final production version. Sorry for not being able to test this myself!