Using MDX
This theme comes with the @astrojs/mdx integration installed and configured in your astro.config.mjs config file. If you prefer not to use MDX, you can disable support by removing the integration from your config file.
Why MDX?
MDX is a special flavor of Markdown that supports embedded JavaScript & JSX syntax. This unlocks the ability to mix JavaScript and UI Components into your Markdown content for things like interactive charts or alerts.
If you have existing content authored in MDX, this integration will hopefully make migrating to Astro a breeze.
Example
Here is how you import and use a UI component inside of MDX.
When you open this page in the browser, you should see the clickable button below.
Embedded component in MDX
More Links
- MDX Syntax Documentation
- Astro Usage Documentation
- Note: Client Directives are still required to create interactive components. Otherwise, all components in your MDX will render as static HTML (no JavaScript) by default.
Get Dogster in Your Inbox
Stay informed! Get tips, stories, and the latest news delivered to your inbox.
How useful was this post?
Click on a star to rate (you can leave written feedback after clicking submit)
3 Responses
This is such important information! We live in California and foxtails are everywhere in our neighborhood during summer. My golden retriever got one lodged in his paw last year and we didn't notice until he was limping badly. $400 vet bill later, lesson learned. Now I check his paws after every single walk.
So sorry to hear about your golden, Sarah! You're doing exactly the right thing now with the post-walk checks. It really does become second nature after a while. Glad he recovered well!
I had no idea these could migrate through tissue. That's terrifying. We just moved to Oregon from the east coast and I've never even heard of foxtails before. Going to be much more careful on our hikes now. Thank you for this article.
As a veterinarian, I can confirm we see dozens of foxtail cases every summer. The ear cases are especially urgent — please don't wait if your dog is shaking their head violently after being in tall grass. Great article overall, very accurate information.