-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
fix(content-blog): make post ID unique #6061
Conversation
@@ -13,14 +13,14 @@ exports[`blogFeed atom shows feed item for each post 1`] = ` | |||
<rights>Copyright</rights> | |||
<entry> | |||
<title type=\\"html\\"><![CDATA[MDX Blog Sample with require calls]]></title> | |||
<id>MDX Blog Sample with require calls</id> | |||
<id>/mdx-require-blog-post</id> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should you be wondering: the id
field doesn't really matter for the feeds. The example of the library itself uses post.url
as the ID.
✔️ [V2] 🔨 Explore the source changes: 209fd5f 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/61af48c1aa156b0008053238 😎 Browse the preview: https://deploy-preview-6061--docusaurus-2.netlify.app |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-6061--docusaurus-2.netlify.app/ |
Size Change: +1.22 kB (0%) Total Size: 657 kB
ℹ️ View Unchanged
|
Breaking change
The blog posts' ID may have changed. Previously, they represented neither the slug nor the title: it was a weird mix of the two, which makes it pretty useless for rendering. Moreover, we discovered that this ID generation is not guaranteed to be unique either. Now, we have normalized all IDs into the posts' slugs. If you relied on the whacky IDs before in your swizzled component, consider using either
metadata.title
orslug
instead.Motivation
Fix #6059
Test plans
Added two dogfooding posts