Comments (31)
@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.
from elegant.
that's what I meant, sorry; glad you agree
from elegant.
@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 3.3.1.dev
and couldn't reproduce the error.
from elegant.
I just pulled latest version from git master
from elegant.
Great, do let me know if you still hit the same issue.
from elegant.
Oh sorry, I should have mentioned that I still experience the same issue. I expected it would be implied.
from elegant.
@tshepang please share a git clone link to your blog source code. I will have to test it locally.
from elegant.
hg clone https://bitbucket.org/tshepang/blog
or
wget https://bitbucket.org/tshepang/blog/get/b9276d910e07.zip
from elegant.
@tshepang some of your articles do not have :date:
defined which is resulting in anomalous output.
You can test it by assigning a new tag to few articles which have date property defined. You will see that articles under a123
are displayed in chronological order.
Pelican and Elegant are working as expected. Hope it was helpful.
from elegant.
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.
from elegant.
Elegant calls |sort
on articles in a tag to display. We do not perform any other operation on it. Sort is performed by the Pelican. I cannot find any problem in sort operation in Pelican source code.
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.
from elegant.
Let me know what you see when you set a new tag on articles that have date defined.
from elegant.
I did that and I still get them sorted alphabetically. I am using Python 3 and have not tried with Python 2.
from elegant.
Now I am totally baffled! My configuration is as follows
Python 2.7.2
Fabric==1.8.0
Jinja2==2.7.1
Markdown==2.3.1
MarkupSafe==0.18
Pygments==1.6
Sphinx==1.2b2
Unidecode==0.04.14
beautifulsoup4==4.3.1
blinker==1.3
docutils==0.11
feedgenerator==1.7
feedparser==5.1.3
paramiko==1.11.1
pelican==3.3
pycrypto==2.6
pytz==2013d
six==1.4.1
smartypants==1.8.2
typogrify==2.0.0
urwid==1.1.1
wsgiref==0.1.2
from elegant.
Ok, I've made a fresh install of Pelican, this time on Python 2, and I still get the same issue.
from elegant.
Can you try excluding articles that do not have date set? Pick a subset of articles and then test.
from elegant.
@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.
from elegant.
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.
from elegant.
I know about the limitations of relying on mtime.
My apologies.
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.
I am officially out of ideas. I cannot reproduce this issue at all.
Can you please report this issue at Pelican repository?
from elegant.
the default theme works for me... does the sorting right
from elegant.
Hmm, I shall reinvestigate it.
from elegant.
@tshepang I created a new blog from scratch and added few sample articles. I still failed to reproduce the issue. 😢
from elegant.
I just did the same too, both with Elegant and default theme, and only the default theme is sorted by date.
from elegant.
Please share output of pip freeze
from elegant.
That's not a good test since those are sorted alphabetically. The point is to show that they are sorted by date.
$ pip freeze
Jinja2==2.7.1
MarkupSafe==0.18
Pygments==1.6
Unidecode==0.04.14
argparse==1.2.1
beautifulsoup4==4.3.2
blinker==1.3
docutils==0.11
feedgenerator==1.7
pelican==3.3
pytz==2013.8
six==1.4.1
wsgiref==0.1.2
from elegant.
- The reason you see tags sorted in default theme is that it does not show articles list in tags.html page. You see the list of articles on tag.html page.
- The reason it is hard to reproduce is that sorting result keeps changing on every run.
- Surprisingly, categories page does not display any similar bug.
- Took me long time to reproduce it.
from elegant.
@tshepang I have fixed it to the best of my knowledge. Thanks for staying persistent.
- Can you please confirm the fix?
- Can you please confirm that categories page do not show this bug?
from elegant.
tis fixed \0/
Categories page is good
thanks much for staying on with me, fixing this annoying issue
from elegant.
I see you have removed the sorting for Tags here: 3228f68#diff-b90e759d0454dce722b4332686b2b55eL41. Is that intentional?
from elegant.
thanks much for staying on with me, fixing this annoying issue
I am relieved! It was a hard to trace bug.
Is that intentional?
Thanks for pointing it out. I removed it thinking it was useless but your comment reminded me its purpose 😄
It is fixed now.
from elegant.
good stuff
from elegant.
Related Issues (20)
- CRITICAL: 'AUTHORS' is undefined
- [Help] Host fonts and js libraries locally? HOT 3
- Make Elegant REUSE compliant
- Request: Add a generic social icon in the sidebar
- Request: Add new social icon in the sidebar: XMPP/Jabber, Matrix, tildes HOT 1
- [BUG] Search does not work on project homepage/documentation HOT 1
- [BUG] Search does not work on Elegant 5.4.0 and Pelican 4.7.1 HOT 9
- Improve the index pages pagination by implementing the new option from Pelican 4.6
- Option to create captions for figures HOT 1
- [Help] How to turn off line wrapping in the code blocks
- [Help] How to insert permalinks to headings?
- Add a link to RSS/Atom feed
- Support for simple stand-alone web analytics borrowed from mkws HOT 1
- Gallery PhotoSwipe Page Not work [BUG]
- [Help] 404 not found with `search` widget queries? HOT 4
- [BUG] Main website host (elegant.oncrashreboot.com) is NXDOMAIN HOT 3
- Replace Font Awesome for Fork Awesome
- Photo Plugin seems to support inline galleries now
- Is there a plan to support a dark version of the theme HOT 1
- Make Elegant more accessible (a11y)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elegant.