A Jekyll plugin that generates pages for Google Calendar events fetched using the Google Calendar API. The event and calendar data is available through the page
variable.
page.event
contains the data of the event resourcepage.calendar
contains calendar information from the API responsepage.calendar_id
contains the calendar ID for the Google CalendarYou must have a Google API service account key and this service account must have read access to the calendars you with to read.
Add this line to your Gemfile within the jekyll_plugins
group.
gem 'jekyll-google-calendar'
And then execute:
$ bundle
Or install it yourself as:
$ gem install jekyll-google-calendar
Add jekyll-google-calendar
to your _config.yml in the plugins array, eg:
plugins:
- jekyll-feed
- jekyll-google-calendar
Add the following configuration to your _config.yml, replacing the items in BLOCKCAPS with details for your own calendars.
gcalendar:
key_file: PATH-TO-YOUR-GOOGLE-SERVICE-ACCOUNT-KEY.json
calendars:
- id: YOUR-CALENDAR-ID # eg. [email protected]
directory: events # the directory in which to place geneated events
layout: gc_event # the Jekyll layout template to use for events
date_format: "%d-%m-%Y" # Uses Strftime formating directive (http://strftime.net/)
look_ahead: 365 # 1 year in days
To use multiple calendars, add additional calendars to the calendars array following the pattern above.
Bug reports and pull requests are welcome on GitHub at https://github.com/davidgundry/jekyll-google-calendar.
The gem is available as open source under the terms of the MIT License.
Updated Rake dependancy to at least version 12.3.3 due to vulnerability.
Added url value to event data for internal event page
Paginated events list generator
Fixed critical bug for events with attendees.
Initial release