Skip to content

Conversation

@mhkuu
Copy link
Contributor

@mhkuu mhkuu commented Sep 19, 2024

Fixes #285

Summary

This PR introduces the lastmod attribute to the sitemap URLs, which replaces the priority and lastfreq attributes. With the update to Docusaurus 3 in #319, we can now make use of the implementation in facebook/docusaurus#9954, as discussed in facebook/docusaurus#2604.

Relevant technical choices

Note that the configuration added to docusaurus.config.js will become a default in Docusaurus V4 and can then be removed.

Test instructions

This PR can be acceptance tested by following these steps:

  1. Open the sitemap.xml.
  2. Confirm the URLs now don't have a priority and lastfreq attributes.
  3. Instead, confirm most URLs have a lastmod attribute, which is the date they were last updated (in the GitHub repository).
  4. Notably, this currently excludes the changelogs. We would need some custom code for that (that's out of scope for this PR).

Quality assurance

  • Security - I have thought about any security implications this code might add.
  • Performance - I have checked that this code doesn't impact performance (greatly).
  • Caching - I have analyzed the caching methods that this code touches and have added instructions to deal with those.
  • Tested - I have tested this code to the best of my abilities.
  • Automated tests - I have added unit tests to verify the code works as intended.
  • Testability - I have added unique ids to elements, so they can be located in automated testing.
  • I have altered a filename.
    • I have adjusted the ID property accordingly and updated all internal links.
    • I have added the redirect to the _redirects file in the root of the project.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Oct 10, 2024

Deploying yoast-developer with  Cloudflare Pages  Cloudflare Pages

Latest commit: fc78560
Status: ✅  Deploy successful!
Preview URL: https://89e23468.yoast-developer.pages.dev
Branch Preview URL: https://add-sitemap-lastmod.yoast-developer.pages.dev

View logs

@mhkuu mhkuu merged commit 8cfd613 into main Oct 11, 2024
@mhkuu mhkuu deleted the add/sitemap-lastmod branch October 11, 2024 07:50
@mhkuu
Copy link
Contributor Author

mhkuu commented Oct 11, 2024

ACC: ✅ (see this Slack convo)

@mhkuu mhkuu mentioned this pull request Oct 11, 2024
2 tasks
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.

Add lastmod to XML sitemap

1 participant