Closed nring closed 2 years ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated |
---|---|---|---|
dept-engineering-blog-ui | ✅ Ready (Inspect) | Visit Preview | Jun 16, 2022 at 2:37PM (UTC) |
Blast, I just realized that this doesn't work when the user is linked to the post from the home page - the injected script never runs.
Blast, I just realized that this doesn't work when the user is linked to the post from the home page - the injected script never runs.
Sorry I didn't notice you were asking for opinions in the original review. Is there any way to avoid this code injection completely? What about the author supplying some styles we could integrate into the project?
I think the author supplying images might be the best bet since this is a step above styling. MathML would be the next best option but Chrome and Edge doesn't support it.
Ok, that sounds fine to me. I'm all for keeping things simple (as long as the SEO isn't super important here)
Just out of curiosity, are there any libraries beyond MathML with better support? Quick google came up with MathJax.
Yeah that's exactly the library the author is trying to include via Ghost! I haven't seen how it affects bundle size if we include it in the whole project, but I'd love to figure out a way to make this on a per-post basis in case another author wants to do something similar with a different library.
Closing this PR as this solution is just too brittle. I'll ask that the post author supply SVGs as tags
The Ghost Admin UI has a section for embedding script tags in both the header and footer. The normal Casper handlebars theme has support for this, but our Next implementation does not. This adds some naive functionality to enable that. The specific use case was for this post:
/benchmarking-rust-code-using-criterion-rs
so that the author can correctly display math equations. MathML is not supported enough, so a third party library was necessary.The other option here is to have the author to supply images for the equations. Thoughts on this approach?