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

[MDX] Extend Markdown plugin config, with customization options #4504

Merged
merged 16 commits into from
Aug 30, 2022

Conversation

bholmesdev
Copy link
Contributor

@bholmesdev bholmesdev commented Aug 26, 2022

Changes

  • remove extends object from remark and rehype plugin config
  • introduce new extendPlugins option 👀 This has 3 values:
    • 'markdown' (default) - inherit all plugins from your project's markdown config 🥳
    • 'astroDefaults' - inherit Astro's default plugins only (GFM and Smartypants)
    • false - do not inherit anything
  • this brings MDX in-line with Markdown's new extendDefaultPlugins option with a bit more granularity!
  • ignore string plugins when inheriting from markdown, with warning log:

image

Testing

Combine MDX plugin tests into a single test suite. This should cover an exhaustive set of possible configs.

Docs

Update README with new plugin instructions

@changeset-bot
Copy link

changeset-bot bot commented Aug 26, 2022

🦋 Changeset detected

Latest commit: a36be1f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@astrojs/mdx Minor
@e2e/preact-component Patch
@e2e/react-component Patch
@e2e/solid-component Patch
@e2e/svelte-component Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: integration Related to any renderer integration (scope) label Aug 26, 2022
@bholmesdev bholmesdev marked this pull request as draft August 26, 2022 20:28
Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple of quick README comments for your consideration, @bholmesdev!

packages/integrations/mdx/README.md Outdated Show resolved Hide resolved
packages/integrations/mdx/README.md Show resolved Hide resolved
@bholmesdev bholmesdev marked this pull request as ready for review August 26, 2022 21:13
Copy link
Contributor

@matthewp matthewp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sgtm

@bholmesdev
Copy link
Contributor Author

Added info log to ease migration. Let me know if this is too much, or just right!

image

@bholmesdev bholmesdev force-pushed the feat/mdx-plugin-extend-markdown-config branch from abf04cc to a36be1f Compare August 29, 2022 20:44
@bholmesdev bholmesdev merged commit 8f8dff4 into main Aug 30, 2022
@bholmesdev bholmesdev deleted the feat/mdx-plugin-extend-markdown-config branch August 30, 2022 17:38
@astrobot-houston astrobot-houston mentioned this pull request Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: integration Related to any renderer integration (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants