-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
[V2] Custom frontmatter/metadata is no longer available #2075
Comments
Its not a bug. Its actually a bug that got fixed. docusaurus/packages/docusaurus-plugin-content-docs/src/__tests__/metadata.test.ts Line 115 in 8a94810
Its never been documented anyway that you can access frontmatter through metadata. Even in v1 it will throw error if you add unsupported field. You should not access frontmatter from metadata. Metadata is something done by plugin. Example: /docs/guides/hello.md defined with frontmatter id: “hello” will have a metadata.id of “guides/hello” If you want to access frontmatter, do it through content.frontmatter |
reasoning is here
|
Its also clear in the link you showed that
|
Thanks, I must have been using an older version of |
@binarylogic We would discourage swizzling components at this point until we reach beta or even 2.0.0 for this very reason. Apologies for the changes. |
🐛 Bug Report
Custom frontmatter/metadata defined in markdown files is no longer accessible within the
DocItem
component when it previously was.It appears this change broke the behavior.
Have you read the Contributing Guidelines on issues?
Yes
To Reproduce
Expected behavior
Frontmatter, by nature, should allow for a variety of keys, especially a platform designed to serve a variety of different project types.
The text was updated successfully, but these errors were encountered: