The Pelican Series plugin (https://github.com/pelican-plugins/series)
is a convenient way for authors to link articles together as multiple
installments of a series.
Add support for the Series plugin to this theme: render articles
belonging to a series with a footer pointing to the preceding and
following articles in the series, using the same styling as "related
posts" links.
This implementation is heavily inspired by the Series plugin in the
Pelican bootstrap3 theme (MIT licensed):
https://github.com/getpelican/pelican-themes/blob/master/pelican-bootstrap3/templates/includes/series.htmlFixes#289.
Pelican 4.5.0 changed the plugins mechanism and the default for
PLUGINS is now None. The following type of construct is used in a
number of places in Flex:
{% if 'tipue_search' in PLUGINS %}
If PLUGINS is not set in pelicanconf.py, the following exception will
be triggered under Pelican 4.5.0:
TypeError: argument of type 'NoneType' is not iterable
The Pelican maintainers did not intend the examination of PLUGINS by
templates to be a stable API (per a discussion on IRC). Per their
request, an enhancement request for a mechanism to do this has been
submitted here: https://github.com/getpelican/pelican/issues/2797
This commit changes the problematic constructs in Flex to be in the
style of:
{% if PLUGINS and 'tipue_search' in PLUGINS %}
This allows Flex to work with Pelican 4.5.0 even if users do not
define PLUGINS. Note that to use the new namespace plugins in Pelican
4.5.0, PLUGINS will have to be left at its default of None.
Resolves#245