osuosl / dougfir-pelican-theme

Pelican theme based off of the OSU Dougfir Drupal theme
Apache License 2.0
2 stars 2 forks source link

supporting multiple tags #64

Open leian7 opened 7 years ago

leian7 commented 7 years ago

Currently, when tagging .rst files, we use this syntax,

tag: frontpage

with code like this:

{% if OSL_HOME_EXTRAS %}
    {% for page in pages %} 
        {% if page.tag == FRONTPAGE %}
            {{ page.content }}
        {% endif %}
    {% endfor %}
{% endif %}

This works for now since we only have one tag "frontpage" for just one article, "about.rst," for both the osl and the cass sites. However, when we do add more tags like tag: frontpage, awesome, the desired functionality breaks, sincepage.tag must equal FRONTPAGE exactly, but it wouldn't. The way to resolve this issue would be to replace {% if page.tag == FRONTPAGE %} with {% if FRONTPAGE in page.tag %}. In addition, it would be nice to change tag: my_tags to tags: my_tags throughout the cass and osl sites not just for consistency, but also because it appears to be The Pelican Way.