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

refactor(blog-plugin): blog archive reverse ordering of posts #9438

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

slorber
Copy link
Collaborator

@slorber slorber commented Oct 23, 2023

Motivation

Chronological ordering is confusing.

v3 is the best time to do this change.

I'm considering it as an UX improvement, not a breaking change.

Test Plan

preview

Test links

https://deploy-preview-9438--docusaurus-2.netlify.app/blog/archive

Related issues/PRs

johnnyreilly/blog.johnnyreilly.com#327

#5428

@slorber slorber added the pr: polish This PR adds a very minor behavior improvement that users will enjoy. label Oct 23, 2023
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Oct 23, 2023
@slorber
Copy link
Collaborator Author

slorber commented Oct 23, 2023

cc @johnnyreilly, was also wondering if the items inside a year should also be in reverse order?

CleanShot 2023-10-23 at 15 25 35@2x

@netlify
Copy link

netlify bot commented Oct 23, 2023

[V2]

Name Link
🔨 Latest commit 126b8ed
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/65367404833a8f0008a31df2
😎 Deploy Preview https://deploy-preview-9438--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions
Copy link

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🟠 63 🟢 97 🟢 92 🟢 100 🟠 89 Report
/docs/installation/ 🟠 78 🟢 98 🟢 92 🟢 100 🟠 89 Report
/docs/category/getting-started/ 🟠 83 🟢 100 🟢 92 🟢 90 🟠 89 Report
/blog/ 🟠 80 🟢 100 🟢 92 🟢 90 🟠 89 Report
/blog/preparing-your-site-for-docusaurus-v3/ 🟠 77 🟢 97 🟢 92 🟢 100 🟠 89 Report
/blog/tags/release/ 🟠 80 🟢 100 🟢 92 🟠 80 🟠 89 Report
/blog/tags/ 🟢 91 🟢 100 🟢 92 🟢 90 🟠 89 Report

@github-actions
Copy link

Size Change: 0 B

Total Size: 1.13 MB

ℹ️ View Unchanged
Filename Size
website/.docusaurus/globalData.json 117 kB
website/build/assets/css/styles.********.css 113 kB
website/build/assets/js/main.********.js 862 kB
website/build/index.html 41.4 kB

compressed-size-action

@johnnyreilly
Copy link
Contributor

johnnyreilly commented Oct 23, 2023

I actually moved away from the in-built docusaurus archive that was based on my blog post https://johnnyreilly.com/blog-archive-for-docusaurus because the ordering seemed strange to me. My handrolled approach looks like this:

image

It looks like the changes you're suggesting align with what I'm doing and so (unsurprisingly) I think this is a good idea!

Interestingly, I was advised it is better for SEO also. The idea being that you typically want newer blog posts to get more noticed. And the higher up the screen, the more significant a link is regarded.


Unrelated to the change you're making here, is there a way to control the URL of the archive functionality? I think it's hardcoded to [BLOG_ROOT]/archive at present. It would be nice if that URL was configurable so people can pick the URL they think is most appropriate.

@Josh-Cena
Copy link
Collaborator

@johnnyreilly: https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-blog#archiveBasePath

@slorber
Copy link
Collaborator Author

slorber commented Oct 24, 2023

ok so let's merge this as is for now 👍

@slorber slorber merged commit f80e1bd into main Oct 24, 2023
29 of 30 checks passed
@slorber slorber deleted the slorber/reverse-blog-post-archive-ordering branch October 24, 2023 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: polish This PR adds a very minor behavior improvement that users will enjoy.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants