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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make this a built-in transformer? #2

Closed
MichaelDeBoey opened this issue May 21, 2020 · 4 comments
Closed

Make this a built-in transformer? #2

MichaelDeBoey opened this issue May 21, 2020 · 4 comments

Comments

@MichaelDeBoey
Copy link

MichaelDeBoey commented May 21, 2020

I'd love to have this one by default in the plugin. 馃憡

@trevorblades @j-f1 @lipis Would you mind creating a PR for this please? 馃

@trevorblades
Copy link
Member

trevorblades commented May 21, 2020

I'd be happy to do this, but I just wanted you to be aware that this transformer includes puppeteer as a dependency. I noticed that the other transformers don't have any dependencies. Would this be an issue @MichaelDeBoey?

@MichaelDeBoey
Copy link
Author

MichaelDeBoey commented May 21, 2020

@trevorblades Hmmm that would be a bummer, since that's a large one...

Although we could add this to the README that puppeteer needs to be installed whenever they want to use the Excalidraw embeds, like we also need gatsby-plugin-twitter when using the Twitter transformer. 馃

Would be better if @excalidraw was providing an oembed endpoint, an iframe or an endpoint to get the image though 馃

@trevorblades
Copy link
Member

It is a large one, but on the other hand, it won't have an impact on the bundle size of the built Gatsby website, since puppeteer is only used during the build process. The only output from this transformer is an inline SVG.

Here's a PR for this change: MichaelDeBoey/gatsby-remark-embedder#122 馃帀

@trevorblades
Copy link
Member

As I expressed in MichaelDeBoey/gatsby-remark-embedder#122 (comment), I think it makes the most sense to keep this as a separate library for now. If a dependency-free solution (ie. an API endpoint or oEmbed) appears in the future, we can revisit this. For now, it sounds like this would not be possible due to the nature of Excalidraw's encryption model: MichaelDeBoey/gatsby-remark-embedder#122 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants