-
Notifications
You must be signed in to change notification settings - Fork 500
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
Hoisted scripts missing in both dev/prod for content collection entry with MDX #106
Comments
Submitted a new issue on astro as per the advice of the author of the original issue |
Hello @noidwasavailable I assume it is the problem with Astro itself and I guess they are still working on this. |
@satnaing Yes, I think it's an Astro problem. I upgraded to Astro v3 manually, but on 3.0.13, the issue persists. I'll try it again on the latest versions and let you know how it goes. |
@satnaing Hi, I finally had the time to get around testing stuff. On upgrading AstroPaper, and manually updating the dependencies for astro to ^3.2.2 (latest), I can confirm, this issue no longer persists, even though there is no mention of hoisted scripts being fixed anywhere on astro 3.0 release. |
Okay, thanks for confirming this. |
I added mdx integration to astro for richer blog content, and created an astro component to use in the mdx documents. I think I followed all directions to do so clearly, but client side
script
tags don't seem to be working in mdx documents.I have the component
@components/ImagePreview.astro
, and if I use it in, saypages/index.astro
, it works fine. But if I import it tocontent/blog/my-blog-post.mdx
and use it there, the HTML is rendered but the script does not work. I bumped up to"astro": "^2.10.4",
and"@astrojs/mdx": "^0.19.7",
because I saw the Astro issue regarding this was closed.I left a comment in that issue thread, saying that this still seems to be an issue for me, but I wasn't sure maybe AstroPaper had some conflicting configurations that I wasn't able to figure out. Link to my comment on the issue
I can get it to work with the
is:inline
directive, but according to the docs, it seems like it should properly work...I've enabled the experimental assets, if that makes any difference, which I doubt because even if I change it to
img
instead ofImage
fromastro:assets
, the behaviour is identical.ImagePreview.astro
component for reference:The text was updated successfully, but these errors were encountered: