zhouji 768e02b2d5 Update signal names for Pelican 3.2+ лет назад: 11
..
Readme.rst a3ddc43746 Improve ical plugin documentation лет назад: 11
__init__.py 71db23cd97 adding ical plugin лет назад: 11
ical.py 768e02b2d5 Update signal names for Pelican 3.2+ лет назад: 11

Readme.rst

ical
----

This plugin looks for and parses an ``.ics`` file if it is defined in a given
page's ``calendar`` metadata. One calendar can be defined per page.

Dependencies
------------

This plugin depends on the ``icalendar`` package, which can be installed via
pip::

pip install icalendar

Usage
-----

For a reST-formatted page, include the following line in the metadata::

:calendar: /path/to/your/ics/file

For Markdown, include the following line in the page metadata::

Calendar: /path/to/your/ics/file

Following is some example code that can be added to your theme's ``page.html``
template in order to display the calendar::

{% if page.calendar %}

{% for vevent in events[page.slug] %}
{{ vevent.summary }}

{{ vevent.description|replace('\n\n', '
') }}

{{ vevent.dtstart }}

{{ vevent.dtend }}

See more

{% endfor %}

{% endif %}