Readme.rst 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. events
  2. ----
  3. This plugin scans blog posts for an events.
  4. It also generates an ``.ical`` calendar file.
  5. Dependencies
  6. ------------
  7. This plugin depends on the ``icalendar`` package, which can be installed
  8. using APT or RPM or, if you are unlucky, via pip::
  9. pip install icalendar
  10. Usage
  11. -----
  12. Add the following to pelicanconf.py::
  13. PLUGIN_EVENTS = {
  14. 'ics_fname': 'calendar.ics',
  15. }
  16. Create articles and usual and add the "event-start" metadata to turn them into
  17. events. The event start is independent of the article "date".
  18. "event-start" is in "YYYY-MM-DD hh:mm" format.
  19. Also add "event-end", in the same format, or "event-duration" as a number
  20. followed by a dimension:
  21. w: weeks
  22. d: days
  23. h: hours
  24. m: minutes
  25. s: seconds
  26. You can also specify an optional "location"
  27. Example in ReST format::
  28. :event-start: 2015-01-21 10:30
  29. :event-duration: 2h
  30. :location: somewhere
  31. To generate an sorted event list in a dedicated page copy the events_list.html
  32. template under the templates directory in your theme, then create a page:
  33. content/pages/events_list.rst::
  34. Events list
  35. ###########
  36. :slug: events-list
  37. :summary:
  38. :template: events_list