Skip to content
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

After upgrade: Reversed order in atom feed #171

Closed
benjaoming opened this issue Nov 10, 2022 · 4 comments · Fixed by #172
Closed

After upgrade: Reversed order in atom feed #171

benjaoming opened this issue Nov 10, 2022 · 4 comments · Fixed by #172

Comments

@benjaoming
Copy link

Describe the bug

Hi friends 👋

In readthedocs/blog#188, we finally got around to upgrade our blog, but it caused our RSS feed to have a reversed order.

We defined blog_feed_length=10. We see exactly the 10 latest blog entries, but it's the order of the cropped list that's reversed.

We noticed because our mailing list uses the RSS feed and suddenly sent out an old newsletter 😢

I can reproduce this consistently by jumping back and forth between our repo before and after readthedocs/blog#188

Since it's probably not so nice to reverse the order of this list again (supposing that others now expect it to have this order), perhaps a setting could work? blog_feed_order_desc=True ?

To Reproduce

No response

Screenshots

No response

System Details

No response

Installation method

No response

@benjaoming benjaoming changed the title Reversed order in atom feed After upgrade: Reversed order in atom feed Nov 10, 2022
@benjaoming
Copy link
Author

I've been jumping around in the changelogs and such to see if I could find the origin of when the change happened. We were running 0.9.5 and upgrading to 0.10.26, so admittedly a huge span.

@nabobalis
Copy link
Contributor

nabobalis commented Nov 10, 2022

That seems like a bug more than a feature. I don't see the need to want to reverse the feed?

I can try to track it down and undo that reversal.

@benjaoming
Copy link
Author

benjaoming commented Nov 11, 2022

I found out that a test was created and expanded to 2 elements in the feed, which is nice. It seems that after the test was expanded, it might have provided a guarantee against the reversal of feed order.

See: https://github.com/sunpy/ablog/blame/a6aed2c5e3fb9c2a9007d2c2c22cca6eb7b9d90b/tests/test_build.py

So I'm guessing that the change occurred before this test.. not sure.. and I still haven't found its origin.

@nabobalis
Copy link
Contributor

nabobalis commented Nov 14, 2022

This should be fixed by #172, I tested it locally changing the dates on the unit tests and it behaves how I think it should work:

Sorted by newest to the oldest posts.

I don't know if you want to test this locally or I can do a new release of 0.10 sometime this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants