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

🐛 BUG: New MDX release breaks if you disable the collect-headings plugin. #4150

Closed
1 task
eliasbrange opened this issue Aug 4, 2022 · 1 comment · Fixed by #4181
Closed
1 task

🐛 BUG: New MDX release breaks if you disable the collect-headings plugin. #4150

eliasbrange opened this issue Aug 4, 2022 · 1 comment · Fixed by #4181
Assignees
Labels
- P5: urgent Fix build-breaking bugs affecting most users, should be released ASAP (priority) pkg: mdx Issues pertaining to `@astrojs/mdx` integration

Comments

@eliasbrange
Copy link

What version of astro are you using?

v1.0.0-rc.5

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

yarn

What operating system are you using?

Windows (WSL 2)

Describe the Bug

The added functionality in MDX that adds headings and frontmatter to layout props (#4134) does not work if you disable the custom plugin collect-headings as specified here: https://docs.astro.build/ar/guides/integrations-guide/mdx/#configuration

If that plugin is disabled, the function getHeadings() does not exist.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-6nege1?file=astro.config.mjs,src%2Fpages%2Findex.mdx,package.json&on=stackblitz

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added this to Needs Triage in 🐛 Bug Tracker Aug 4, 2022
@FredKSchott FredKSchott added - P5: urgent Fix build-breaking bugs affecting most users, should be released ASAP (priority) s1-small pkg: mdx Issues pertaining to `@astrojs/mdx` integration labels Aug 5, 2022
@bholmesdev
Copy link
Contributor

Thanks for reporting! Agreed that getHeadings should always be applied. We decided to make our collect-headings plugin non-overridable for now. If you have a reason we should allow users to remove this plugin, we can re-open!

🐛 Bug Tracker automation moved this from Needs Triage to Done Aug 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P5: urgent Fix build-breaking bugs affecting most users, should be released ASAP (priority) pkg: mdx Issues pertaining to `@astrojs/mdx` integration
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants