Plugin to get easy the content of your Google calendar as a list in your Kirby-Website.
Requirements: Kirby CMS >= v3.0.1
There are three ways to get the plugin:
Download and copy this repository to /site/plugins/
.
That's it. You're done.
Go to the root of your Project, copy git submodule add https://github.com/benediktengel/G´google-calendar-plugin.git site/plugins/google-calendar-plugin
in your command line and press enter.
Done. The plugin appears in site/plugins
.
Copy composer require benediktengel/google-calendar-plugin
to your command line and press enter.
Done. Also here, the plugin appears in site/plugins
.
'benediktengel.google-calendar-plugin.apikey' => 'YOUR-API-KEY',
'benediktengel.google-calendar-plugin.calendarID' => 'YOUR-CALENDAR-ID'
Need Help? How to get them.
Find the right place for the calendar and add <?= snippet('calendar') ?>
You did it.
-
Set your API-Key:
benediktengel.google-calendar-plugin.apikey' => 'YOUR-API-KEY'
- required
-
Set your calendarID:
'benediktengel.google-calendar-plugin.calendarID' => 'YOUR-CALENDAR-ID'
- required
-
Change the date format:
'benediktengel.google-calendar-plugin.formatDate' => 'd.m.Y'
- default:
'd.m.Y'
- optional
- default:
-
Change the time format:
'benediktengel.google-calendar-plugin.formatTime' => 'H:i'
- default:
'H:i'
- optional
- default:
-
What attributes of the events do you want:
'benediktengel.google-calendar-plugin.attributes' => []
- default:
['title', 'dateStart','timeStart', 'dateEnd', 'timeEnd', 'description', 'location', 'url']
- possible:
'title'
'dateStart'
'timeStart'
'dateEnd'
'timeEnd'
'description'
'location'
'url'
- optional
- default:
-
Show only upcoming events:
'benediktengel.google-calendar-plugin.upcoming' => true
- default:
true
- optional
- works only if
attributes
are set to default or the attributedateEnd
is set.
- default:
-
Shorten the displayed description:
'benediktengel.google-calendar-plugin.descriptionLength' => '300'
- default:
'300'
- optional
- works only if
cutDescription
is true
- default:
-
Don't short the description:
'benediktengel.google-calendar-plugin.cutDescription' => true
- default:
true
- optional
- default:
-
Name of the link:
'benediktengel.google-calendar-plugin.linkName' => 'Show more.'
- default:
'Show more.'
- optional
- default:
-
Style it!
Each Event comes like this, so you can use the classes to style:
<div class="calendar-event"> <h4 class="calendar-title"> New Year's Eve party </h4> <p class="calendar-datetime"> <span class="calendar-start"> 31.12.2018 20:00 </span> - <span class="calendar-end"> 01.01.2019 08:00 </span> </p> <p class="calendar-location"> My place </p> <p class="calendar-description"> Come to celebrate the new year together. <a class="calendar-link"> Show more. </a> </p> </div>
- Section for the settings
- month view
- week view
Wishes? Write an issue and use the label enhancement
.
Write an issue and maybe I can help you.
MIT
Benedikt Engel, 2019
Want to support me? If yes, buy me a coffee ☕. Beer is also okay🍻.
Thanks!