-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chronological article listing #2903
Comments
It's definitely possible that this can be done with a pelican extension in a way that I'm not seeing. If that's the case and writing a generator for this is simple, this probably doesn't need to go in the main codebase. |
Disregard, I've found a way to do this with standard extensions. |
Once I pack together a standard extension that does this I'll link it here! Heck, this is the sort of thing that it might sense to merge into pelican one day, once it exists. |
Added an implementation at https://github.com/GiovanH/peliplugins/blob/master/chrono.py, see readme for details! |
Nice! |
Feature Request
I would like to add index pages (tags, categories, all) that show posts in chronological order, instead of the default latest-first sort.
ARTICLE_ORDER_BY
is almost perfect for this, but it replaces the entire index, forcing you to choose one and only one sort order. What I want to do is add functionality without replacing any.On tumblr, you can can browse a blog's tag in either order: chronological order or latest-first. The URL schemes look like this:
Default:
https://{blog}.tumblr.com/tagged/{tag}/page/{i}
Chrono:
https://{blog}.tumblr.com/tagged/{tag}/chrono/page/{i}
I've been trying to hack together a way to reproduce this without forking pelican, and have had no luck. This can't be done with pure template language (since pagination happens in pelican) and I haven't figured out a way to make an additional generator that's correct to the pelican ArticlesGenerator without duplicating code.
Essentially, this would just be generating index pages (tags, categories, etc) twice, once with a different
order_by
setting.This could be an optional feature enabled with a setting. This shouldn't interfere with feed generation, which would respect
ARTICLE_ORDER_BY
.The text was updated successfully, but these errors were encountered: