Pelican plugin to surface articles published on the same month/day in previous years.
Project description
pelican-on-this-day
Pelican plugin that shows articles published on the same month/day in previous years — an "On This Day" section.
The section is rendered client-side: at build time the plugin writes a JSON map of "MM-DD" → articles to the output, and the bundled JS picks the visitor's local date at page load. The section therefore stays correct on a static host without daily rebuilds, and articles from the visitor's current year are excluded.
Usage
Add to PLUGINS in pelicanconf.py:
PLUGINS = [
...
"pelican.plugins.on_this_day",
]
That's it for the Attila theme — the plugin overrides the footer partial with a placeholder and wires everything up:
<aside id="on-this-day" hidden data-source="{{ SITEURL }}/static/pelican_on_this_day/on-this-day.json">
<div class="inner">
<p class="on-this-day-label">{% trans %}On This Day{% endtrans %}</p>
<div class="on-this-day-grid"></div>
</div>
</aside>
<script src="{{ SITEURL }}/static/pelican_on_this_day/js/on-this-day.js" defer></script>
For other themes, include the same placeholder markup anywhere in your templates; the JS fills .on-this-day-grid and removes hidden when there are matching articles. The section stays hidden when there is nothing to show (or when the data file can't be fetched).
What gets emitted
output/static/pelican_on_this_day/on-this-day.json—{"MM-DD": [{"year", "date", "title", "url"}, ...], ...}, newest first, URLs prefixed withSITEURLoutput/static/pelican_on_this_day/js/on-this-day.js— client-side rendereroutput/static/pelican_on_this_day/css/on-this-day.css— appended toCSS_OVERRIDEautomatically
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pelican_on_this_day-0.3.0.tar.gz.
File metadata
- Download URL: pelican_on_this_day-0.3.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e3319170242ace94bb134c74f3cc24de9a26621db35f5aeeef16ae4e6036c52
|
|
| MD5 |
c85d589a7984304de4a6828f5b00bda6
|
|
| BLAKE2b-256 |
711f60e1da1b91fec7767b81c8b410a9e79f849a5939ad94e416e3ea486d8999
|
Provenance
The following attestation bundles were made for pelican_on_this_day-0.3.0.tar.gz:
Publisher:
publish-to-pypi.yaml on Lee-W/pelican-on-this-day
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pelican_on_this_day-0.3.0.tar.gz -
Subject digest:
9e3319170242ace94bb134c74f3cc24de9a26621db35f5aeeef16ae4e6036c52 - Sigstore transparency entry: 1785845133
- Sigstore integration time:
-
Permalink:
Lee-W/pelican-on-this-day@c22292c329a9ce8f033647b35aa8103b6e119797 -
Branch / Tag:
refs/tags/0.3.0 - Owner: https://github.com/Lee-W
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yaml@c22292c329a9ce8f033647b35aa8103b6e119797 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pelican_on_this_day-0.3.0-py3-none-any.whl.
File metadata
- Download URL: pelican_on_this_day-0.3.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27dfde8859317d8344c15af9bf8cfad485fe193887a1558e4d43c00b9f985ec4
|
|
| MD5 |
e625feeb8c68837dc657c44008b74d5c
|
|
| BLAKE2b-256 |
fffe60d19c99fa19c42b0717741fda7ef9f92d0f2db8ff2439d4004e499a4422
|
Provenance
The following attestation bundles were made for pelican_on_this_day-0.3.0-py3-none-any.whl:
Publisher:
publish-to-pypi.yaml on Lee-W/pelican-on-this-day
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pelican_on_this_day-0.3.0-py3-none-any.whl -
Subject digest:
27dfde8859317d8344c15af9bf8cfad485fe193887a1558e4d43c00b9f985ec4 - Sigstore transparency entry: 1785845192
- Sigstore integration time:
-
Permalink:
Lee-W/pelican-on-this-day@c22292c329a9ce8f033647b35aa8103b6e119797 -
Branch / Tag:
refs/tags/0.3.0 - Owner: https://github.com/Lee-W
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yaml@c22292c329a9ce8f033647b35aa8103b6e119797 -
Trigger Event:
push
-
Statement type: