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

Sort newest to oldest in sitemap files #4616

Merged
merged 1 commit into from
Dec 10, 2014
Merged

Conversation

jgable
Copy link
Contributor

@jgable jgable commented Dec 9, 2014

Closes #4611

Refactored generateXmlFromNodes to pull the urlElements itself from sorted values in the lookup.

Added some checks to existing unit tests to validate ordering.

Closes TryGhost#4611

Refactored generateXmlFromNodes to pull the urlElements itself from
sorted values in the lookup

Added some checks to existing unit tests to validate ordering.
@jaswilli
Copy link
Contributor

I wouldn't doubt that it's just me but I'm testing this and it seems like the listings are still being sorted oldest -> newest.

Maybe I'm wrong but my assumption was that the sitemaps are in-memory and restarting Ghost would trigger a refresh/rebuild?

@jgable
Copy link
Contributor Author

jgable commented Dec 10, 2014

@jaswilli They are in memory, but shouldn't need a restart to update. Let me double check; I relied on the unit test with the order check but didn't test thoroughly while adding/updating/removing posts live on my dev site.

@jaswilli
Copy link
Contributor

@jgable sorry, I was focusing on /sitemap.xml and not the individual indexes for the different types of resources. Those are indeed ordered correctly now.

jaswilli added a commit that referenced this pull request Dec 10, 2014
Sort newest to oldest in sitemap files
@jaswilli jaswilli merged commit b81bde5 into TryGhost:master Dec 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Sitemap sort order
2 participants