Search code examples
pythonhtmlpelican

How to customize individual category pages in Pelican


I have a website that has an events category page where all articles that are 'events' will be listed. However, I would like to customize the top of this page to include a google calendar. How do I do this in Pelican without it affecting all the other categories?

I tried changing the theme/article_list.html template to have a {% if category == 'events' %} html block but this did not work.

Thanks in advance


Solution

  • category is object which has property name (and other properties)

    {% if category.name == 'Events' %}