Pelican plugin to surface articles published on the same month/day in previous years.
Project description
pelican-on-this-day
Pelican plugin that injects articles published on the same month/day in previous years into the template context as on_this_day_articles.
Usage
Add to PLUGINS in pelicanconf.py:
PLUGINS = [
...
"pelican.plugins.on_this_day",
]
Then use on_this_day_articles in your theme templates. Example (e.g. in a footer partial):
{% if on_this_day_articles %}
<aside id="on-this-day">
<div class="inner">
<p class="on-this-day-label">歷史上的今天</p>
<div class="on-this-day-grid">
{% for article in on_this_day_articles %}
<a class="on-this-day-item" href="{{ SITEURL }}/{{ article.url }}">
<section class="post-nav-teaser">
<p class="post-nav-meta"><time datetime="{{ article.date.isoformat() }}">{{ article.date.strftime("%Y") }}</time></p>
<h2 class="post-nav-title">{{ article.title|striptags|e }}</h2>
</section>
</a>
{% endfor %}
</div>
</div>
</aside>
{% endif %}
The plugin automatically copies on-this-day.css to output/static/pelican_on_this_day/css/ and appends it to CSS_OVERRIDE (used by the Attila theme).
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.2.0.tar.gz.
File metadata
- Download URL: pelican_on_this_day-0.2.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
796d626bfb5ddee2c613c9de448f7f6fbb1d573e2ee72e1c8dfafe1ae1d50dcd
|
|
| MD5 |
ab9364c328bd9f1e8554f84d09af92de
|
|
| BLAKE2b-256 |
770786f56f71f7690f036129cdfb5c9348f684b213f017982185e6d64f8e47b1
|
Provenance
The following attestation bundles were made for pelican_on_this_day-0.2.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.2.0.tar.gz -
Subject digest:
796d626bfb5ddee2c613c9de448f7f6fbb1d573e2ee72e1c8dfafe1ae1d50dcd - Sigstore transparency entry: 1707468383
- Sigstore integration time:
-
Permalink:
Lee-W/pelican-on-this-day@1987ed924aea839cefbec88d48bce884b8485114 -
Branch / Tag:
refs/tags/0.2.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@1987ed924aea839cefbec88d48bce884b8485114 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pelican_on_this_day-0.2.0-py3-none-any.whl.
File metadata
- Download URL: pelican_on_this_day-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.7 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 |
c925e0e14a1e6266b2d577ba05debc7e227b1d6a5f46913fe0ee3b55220ec11b
|
|
| MD5 |
c8adeece4c7edaf7607c8fc953358b4b
|
|
| BLAKE2b-256 |
db8ff69d6a97782e055a114f512d6b1b27560932c03e9f2420d689c805721bc8
|
Provenance
The following attestation bundles were made for pelican_on_this_day-0.2.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.2.0-py3-none-any.whl -
Subject digest:
c925e0e14a1e6266b2d577ba05debc7e227b1d6a5f46913fe0ee3b55220ec11b - Sigstore transparency entry: 1707468389
- Sigstore integration time:
-
Permalink:
Lee-W/pelican-on-this-day@1987ed924aea839cefbec88d48bce884b8485114 -
Branch / Tag:
refs/tags/0.2.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@1987ed924aea839cefbec88d48bce884b8485114 -
Trigger Event:
push
-
Statement type: