-
Notifications
You must be signed in to change notification settings - Fork 185
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
tags should be sorted by date #34
Comments
@tshepang Good catch. You mean articles for each tags should be sorted by their published date instead of name. This should be fixed I agree. In fact we should show date along with each article, just like we do in categories. |
that's what I meant, sorry; glad you agree |
@tshepang articles under a tag are already sorted by date in descending order. Just like categories. Which version of Pelican are you running? I tested it on |
I just pulled latest version from git master |
Great, do let me know if you still hit the same issue. |
Oh sorry, I should have mentioned that I still experience the same issue. I expected it would be implied. |
@tshepang please share a git clone link to your blog source code. I will have to test it locally. |
or
|
@tshepang some of your articles do not have You can test it by assigning a new tag to few articles which have date property defined. You will see that articles under Pelican and Elegant are working as expected. Hope it was helpful. |
I no sure I understand. None of the Posts I see are sorted by date, under any tag. Does this mean that if just one Post lacks a Date field, the sorting becomes sorted alphabetically? Also, Pelican automatically appends date if none is supplied, in which case it uses mtime. |
Elegant calls I created some new articles in your blog. I set date of some old articles. I assign all of them a new tag. They were displayed in chronological order as expected. |
Let me know what you see when you set a new tag on articles that have date defined. |
I did that and I still get them sorted alphabetically. I am using Python 3 and have not tried with Python 2. |
Now I am totally baffled! My configuration is as follows Python 2.7.2 |
Ok, I've made a fresh install of Pelican, this time on Python 2, and I still get the same issue. |
Can you try excluding articles that do not have date set? Pick a subset of articles and then test. |
@tshepang If date of an article is not defined, Pelican uses mtime which is last modified date of a file. It can be changed by the file for a lot many reasons, like moving the file around, sync service can update and so on. Now to your eyes that article is old but because of missing date, Pelican is using mtime of the file which is not old. As a result that article appears on top of your list. |
I know about the limitations of relying on mtime. BTW, I tested by creating new posts, all using the same tag, and all having the Date set. That's how I could reproduce the issue. |
My apologies.
I am officially out of ideas. I cannot reproduce this issue at all. Can you please report this issue at Pelican repository? |
the default theme works for me... does the sorting right |
Hmm, I shall reinvestigate it. |
@tshepang I created a new blog from scratch and added few sample articles. I still failed to reproduce the issue. 😢 |
I just did the same too, both with Elegant and default theme, and only the default theme is sorted by date. |
That's not a good test since those are sorted alphabetically. The point is to show that they are sorted by date.
|
|
@tshepang I have fixed it to the best of my knowledge. Thanks for staying persistent.
|
tis fixed \0/ |
I see you have removed the sorting for Tags here: 3228f68#diff-b90e759d0454dce722b4332686b2b55eL41. Is that intentional? |
I am relieved! It was a hard to trace bug.
Thanks for pointing it out. I removed it thinking it was useless but your comment reminded me its purpose 😄 It is fixed now. |
good stuff |
makes more sense to me; at the moment they are sorted by name
compare http://demo-moment.tshepang.net/tag/#Python
with http://tshepang.net/tags#Python-ref
The text was updated successfully, but these errors were encountered: