-
I'm having an issue accessing series variables in my templates; I'm not sure if this is a bug or if I've broken something. I build my site out of a virtualenv. I'm running the latest Pelican (4.8.0). I have pelican-series installed. % pip list | grep series
pelican-series 2.1.0 I have not included pelican-series in my PLUGINS config list as that results in errors, regardless of which separator I use to reference it (also the pelican-series docs don't indicate this is necessary).
Now.. my problem... Given the following article: Sample Article
==============
:date: 2023-09-01 11:50:00
:summary: A sample article.
:series: A Group of Sample Articles
Some stuff to say. And the following bit of templating for my article headers: {% if SHOW_SERIES and article.series %}
<div class="row">
<div class="col-12">
<span class="badge bg-secondary">
<i aria-hidden="true" class="fa-regular fa-layer-group"></i>
Series
</span>
Part {{ article.series.index }} of {{ article.series.name }}
</div>
</div>
{% endif %} {# SHOW_SERIES #} I am getting the following HTML: <div class="row">
<div class="col-12">
<span class="badge bg-secondary">
<i aria-hidden="true" class="fa-regular fa-layer-group"></i>
Series
</span>
Part <built-in method index of str object at 0x1058a3410> of·
</div>
</div> Python seems to be finding a method at Anyone know what issue I'm running into here? Or is this a bug I need to report? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Answering my own question here: The pelican-series README on github doesn't indicate a need to load the plugin via the PLUGINS = [
'...',
'pelican.plugins.series',
'...'
] Filing a docs bug against the README, and closing this discussion. |
Beta Was this translation helpful? Give feedback.
Answering my own question here:
The pelican-series README on github doesn't indicate a need to load the plugin via the
pelicanconf.py
, but the docs on pypi.org do, which I found while continuing to research this...Filing a docs bug against the README, and closing this discussion.