Skip to main content

Pelican Series: A Plugin for Pelican

This plugin extends the original series plugin by FELD Boris lothiraldan@gmail.com Copyright (c) Leonardo Giordani giordani.leonardo@gmail.com This plugin is also in the Pelican Plugins repository

The series plugin allows you to join different posts into a series.

In order to mark posts as part of a series, use the :series: metadata:

:series:  NAME_OF_THIS_SERIES

or, in Markdown syntax

Series: NAME_OF_THIS_SERIES

The plugin collects all articles belonging to the same series and provides series-related variables that you can use in your template.

Indexing

By default articles in a series are ordered by date and then automatically numbered.

If you want to force a given order just specify the :series_index: metadata or in Markdown series_index:, starting from 1. All articles with this enforced index are put at the beginning of the series and ordered according to the index itself. All the remaining articles come after them, ordered by date.

The plugin provides the following variables to your templates

* `article.series.name` is the name of the series as specified in the article metadata
* `article.series.index` is the index of the current article inside the series
* `article.series.all` is an ordered list of all articles in the series (including the current one)
* `article.series.all_previous` is an ordered list of the articles published before the current one
* `article.series.all_next` is an ordered list of the articles published after the current one
* `article.series.previous` is the previous article in the series (a shortcut to `article.series.all_previous[-1]`)
* `article.series.next` is the next article in the series (a shortcut to `article.series.all_next[0]`)
* `article.series.first` is the first article in the series
* `article.series.last` is the last article in the series

For example:

{% if article.series %}
    <p>This post is part {{ article.series.index }} of the "{{ article.series.name }}" series:</p>
    <ol class="parts">
        {% for part_article in article.series.all %}
            <li {% if part_article == article %}class="active"{% endif %}>
                <a href='{{ SITEURL }}/{{ part_article.url }}'>{{ part_article.title }}</a>
            </li>
        {% endfor %}
    </ol>
{% endif %}

Joins articles in a series and provides variables to manage the series in the template.

Installation

This plugin can be installed via:

pip install pelican-series-plugin

Next add it to the PLUGINS section in pelicanconf.py

PLUGINS = [
    '...',
    'pelican.plugins.series',
    '...'
]

Contributing

Contributions are welcome and much appreciated. Every little bit helps. You can contribute by improving the documentation, adding missing features, and fixing bugs. You can also help out by reviewing and commenting on existing issues.

To start contributing to this plugin, review the Contributing to Pelican documentation, beginning with the Contributing Code section.

Release files for pelican-series-plugin 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pelican-series-plugin 1.1.1
File Size Uploaded
pelican-series-plugin-1.1.1.tar.gz 4.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pelican-series-plugin 1.1.1
File Interpreter ABI Platform
pelican_series_plugin-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.6 kB

Release files / pelican-series-plugin-1.1.1.tar.gz

Download URL pelican-series-plugin-1.1.1.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b5016021f934e39e8051c413bc2833e94e293d797d35bcb8588cd2a6fc642c28
BLAKE2b-256 checksum
How to use checksums
cfe87980a082b4746f8da68f8aff338dba8638843ff3df6453ab69d4befc35f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.8.1 Darwin/19.6.0

Release files / pelican_series_plugin-1.1.1-py3-none-any.whl

Download URL pelican_series_plugin-1.1.1-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
37e212a9c3c890c3930a769d45b2293cd845018f841a492b52055b7a139b4c89
BLAKE2b-256 checksum
How to use checksums
53aa2672ff25b0bd26118c49f2c25729df5925ef89b6a54e550ff529a79cde8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.8.1 Darwin/19.6.0

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page