Giter Club home page Giter Club logo

Comments (31)

talha131 avatar talha131 commented on September 25, 2024

@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.

tshepang avatar tshepang commented on September 25, 2024

that's what I meant, sorry; glad you agree

from elegant.

talha131 avatar talha131 commented on September 25, 2024

@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.

tshepang avatar tshepang commented on September 25, 2024

I just pulled latest version from git master

from elegant.

talha131 avatar talha131 commented on September 25, 2024

Great, do let me know if you still hit the same issue.

from elegant.

tshepang avatar tshepang commented on September 25, 2024

Oh sorry, I should have mentioned that I still experience the same issue. I expected it would be implied.

from elegant.

talha131 avatar talha131 commented on September 25, 2024

@tshepang please share a git clone link to your blog source code. I will have to test it locally.

from elegant.

tshepang avatar tshepang commented on September 25, 2024
hg clone https://bitbucket.org/tshepang/blog

or

wget https://bitbucket.org/tshepang/blog/get/b9276d910e07.zip

from elegant.

talha131 avatar talha131 commented on September 25, 2024

@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.

tshepang avatar tshepang commented on September 25, 2024

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.

talha131 avatar talha131 commented on September 25, 2024

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.

talha131 avatar talha131 commented on September 25, 2024

Let me know what you see when you set a new tag on articles that have date defined.

from elegant.

tshepang avatar tshepang commented on September 25, 2024

I did that and I still get them sorted alphabetically. I am using Python 3 and have not tried with Python 2.

from elegant.

talha131 avatar talha131 commented on September 25, 2024

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.

tshepang avatar tshepang commented on September 25, 2024

Ok, I've made a fresh install of Pelican, this time on Python 2, and I still get the same issue.

from elegant.

talha131 avatar talha131 commented on September 25, 2024

Can you try excluding articles that do not have date set? Pick a subset of articles and then test.

from elegant.

talha131 avatar talha131 commented on September 25, 2024

@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.

tshepang avatar tshepang commented on September 25, 2024

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.

talha131 avatar talha131 commented on September 25, 2024

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.

tshepang avatar tshepang commented on September 25, 2024

the default theme works for me... does the sorting right

from elegant.

talha131 avatar talha131 commented on September 25, 2024

Hmm, I shall reinvestigate it.

from elegant.

talha131 avatar talha131 commented on September 25, 2024

@tshepang I created a new blog from scratch and added few sample articles. I still failed to reproduce the issue. 😢

from elegant.

tshepang avatar tshepang commented on September 25, 2024

I just did the same too, both with Elegant and default theme, and only the default theme is sorted by date.

from elegant.

talha131 avatar talha131 commented on September 25, 2024

This is my output
screen shot 2013-11-10 at 4 59 33 am

Please share output of pip freeze

from elegant.

tshepang avatar tshepang commented on September 25, 2024

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.

talha131 avatar talha131 commented on September 25, 2024
  1. 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.
  2. The reason it is hard to reproduce is that sorting result keeps changing on every run.
  3. Surprisingly, categories page does not display any similar bug.
  4. Took me long time to reproduce it.

from elegant.

talha131 avatar talha131 commented on September 25, 2024

@tshepang I have fixed it to the best of my knowledge. Thanks for staying persistent.

  1. Can you please confirm the fix?
  2. Can you please confirm that categories page do not show this bug?

from elegant.

tshepang avatar tshepang commented on September 25, 2024

tis fixed \0/
Categories page is good
thanks much for staying on with me, fixing this annoying issue

from elegant.

tshepang avatar tshepang commented on September 25, 2024

I see you have removed the sorting for Tags here: 3228f68#diff-b90e759d0454dce722b4332686b2b55eL41. Is that intentional?

from elegant.

talha131 avatar talha131 commented on September 25, 2024

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.

tshepang avatar tshepang commented on September 25, 2024

good stuff

from elegant.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.