Skip to main content

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 (needs the version providing the partials/footer_extra.html hook) — the plugin overrides that hook 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

The plugin only needs the placeholder <aside> and the script tag somewhere in your templates — no Attila-specific markup or CSS variables required:

<aside id="on-this-day" hidden data-source="{{ SITEURL }}/static/pelican_on_this_day/on-this-day.json">
  <p class="on-this-day-label">On This Day</p>
  <div class="on-this-day-grid"></div>
</aside>
<script src="{{ SITEURL }}/static/pelican_on_this_day/js/on-this-day.js" defer></script>

The JS fills .on-this-day-grid with <a class="on-this-day-item"> entries 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). The bundled CSS (added to CSS_OVERRIDE automatically) styles those classes using --color-background-contrast, --color-content-secondary, and --color-primary custom properties — define them yourself, or skip the bundled CSS (drop on-this-day.css from CSS_OVERRIDE after the plugin adds it) and style .on-this-day-item and friends to match your theme.

Settings

  • ON_THIS_DAY_MAX_ITEMS (optional, default unlimited) — cap the number of articles shown per day, keeping the newest ones.

What gets emitted

  • output/static/pelican_on_this_day/on-this-day.json — {"MM-DD": [{"year", "date", "title", "url"}, ...], ...}, newest first, URLs prefixed with SITEURL
  • output/static/pelican_on_this_day/js/on-this-day.js — client-side renderer
  • output/static/pelican_on_this_day/css/on-this-day.css — appended to CSS_OVERRIDE automatically

Metadata

Release files for pelican-on-this-day 0.5.0

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-on-this-day 0.5.0
File Size Uploaded
pelican_on_this_day-0.5.0.tar.gz 5.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pelican-on-this-day 0.5.0
File Interpreter ABI Platform
pelican_on_this_day-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.8 kB

Release files / pelican_on_this_day-0.5.0.tar.gz

Download URL pelican_on_this_day-0.5.0.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
52fffb61497781e76a727dffd49fc02fa0d930ecd173a97d3781e2fb83344b53
BLAKE2b-256 checksum
How to use checksums
eab251795ae3f2bd0ff862c10dc4723477a6390d6352a89f50b13bc5f521ea87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 13, 2026.

Transparency log

Release files / pelican_on_this_day-0.5.0-py3-none-any.whl

Download URL pelican_on_this_day-0.5.0-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
49941d4b1567d17bfeb265c6c98699f805ef088724320b11134d0de7c55dd84a
BLAKE2b-256 checksum
How to use checksums
e8e37e4410efedcf2fb6cdc90ceb3197ba3957e6b22de88c783ebe8b348e05f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 13, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

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