Description
Currently our blog post URLs are the default docusaurus paths, e.g. https://www.pantsbuild.org/blog/2024/03/27/pants-2-20
The 2024/03/27
part of that is slightly problematic (e.g. #191):
- it's in a URL, so we shouldn't change it (or at least, should redirect) if we need to change it
- a PR might either merge quicker or slower than expected, so whatever date a person chooses when first writing a post is likely to be wrong by the time it merges
- it's easy to forget to update it to "today" just before merge (e.g. I did this for the post above, Pants 2.20 was released on 2024-04-16 and the post was published then too, not 2024-03-27)
If the date is only metadata displayed to readers, then fixing it after merge is easy and fine... but if it's in the URL, fixing it is hard.
Other options:
- no date in URL:
https://www.pantsbuild.org/blog/pants-2-20
- only year:
https://www.pantsbuild.org/blog/2024/pants-2-20
- only year/month:
https://www.pantsbuild.org/blog/2024/03/pants-2-20
The latter two mean we have some sort of indication of time but a bigger window of validity (i.e. lower chance of making a mistake that's incorrect), but feel somewhat unnecessary.
Based facebook/docusaurus#3284 and what Docusarus itself does (source -> https://docusaurus.io/blog/preparing-your-site-for-docusaurus-v3), I think this unfortunately means remembering to add slug: ...
for every single post, so maybe we should have a CI rule that enforces it (plus redirects for old posts).
Activity