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

Comfy::ArchiveHelper#comfy_archive_link_to_month should produce links to month padded with leading zero #3

Open
morgant opened this issue Apr 2, 2023 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@morgant
Copy link
Collaborator

morgant commented Apr 2, 2023

Comfy::ArchiveHelper#comfy_archive_link_to_month only produces links with the month portion of the path padded with a leading zero if one specifically passes a month with a leading zero, for example: comfy_archive_link_to_month(2020, "07") will link to /blog/2020/07. Otherwise, it will not pad the month portion of the path, for example: comfy_archive_link_to_month(2020, 7) will link to /blog/2022/7.

While this is not technically incorrect, it'd be preferable to always pad the month portion of the path with a leading zero. To ensure that the URLs for monthly archives with the leading zero are considered canonical for SEO reasons, instead of those without the leading zero, we should probably also automatically redirect the non-padded month archives to the padded month archives.

@morgant morgant added the bug Something isn't working label Apr 2, 2023
@morgant morgant added this to the 0.4.0 milestone Apr 2, 2023
@morgant morgant self-assigned this Apr 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant