Series is a Pelican plugin that joins multiple posts into a series
Project description
Series: A Plugin for Pelican
Series is a Pelican plugin that joins multiple posts into a series.
Installation
This plugin can be installed via:
python -m pip install pelican-series
Usage
In order to mark reStructuredText-formatted posts as part of a series, use the :series:
metadata:
:series: NAME_OF_THIS_SERIES
Or, for Markdown-formatted content:
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, specify the :series_index:
(reST) or series_index:
(Markdown) metadata, 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 metadataarticle.series.index
is the index of the current article inside the seriesarticle.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 onearticle.series.all_next
is an ordered list of the articles published after the current onearticle.series.previous
is the previous article in the series (a shortcut toarticle.series.all_previous[-1]
)article.series.next
is the next article in the series (a shortcut toarticle.series.all_next[0]
)
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 %}
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.
License
This project is licensed under the AGPL 3.0 license.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pelican-series-2.0.0.tar.gz
.
File metadata
- Download URL: pelican-series-2.0.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.5 CPython/3.9.2 Linux/5.4.0-1040-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a73f0730587a460c3480848c774f7ea01bd4cb71f611e38d830e16119963690f |
|
MD5 | bf94c9040ef8b9ca95c19c19817ab066 |
|
BLAKE2b-256 | e294032aba4d2c285ea025366a835aa5d47f9bdabcba49f1c2e3aeacfd05335e |
File details
Details for the file pelican_series-2.0.0-py3-none-any.whl
.
File metadata
- Download URL: pelican_series-2.0.0-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.5 CPython/3.9.2 Linux/5.4.0-1040-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91daeba30d51742955aecd0fba00f3d2bc6b107810fd852b263a361d5e2f9d8b |
|
MD5 | c7f5f3480a7638ccf2828ec91f30c753 |
|
BLAKE2b-256 | 1d04d51254d0e0423e2263846711cf43f3ccb8d00717e12752739f4b9838fff3 |