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

gatsby-remark-graph plugin mention #2921

Merged
merged 1 commit into from
Nov 15, 2017
Merged

Conversation

konsumer
Copy link
Contributor

I made a nice plugin for making graphs with mermaid

@KyleAMathews
Copy link
Contributor

Deploy preview failed.

Built with commit 9f1f6f7

https://app.netlify.com/sites/using-glamor/deploys/5a0bb6b2df99532513c8bd1d

@gatsbybot
Copy link
Collaborator

Deploy preview ready!

Built with commit 9f1f6f7

https://deploy-preview-2921--gatsbygram.netlify.com

@gatsbybot
Copy link
Collaborator

Deploy preview ready!

Built with commit 9f1f6f7

https://deploy-preview-2921--using-drupal.netlify.com

@KyleAMathews KyleAMathews merged commit 1c0fb3f into gatsbyjs:master Nov 15, 2017
@KyleAMathews
Copy link
Contributor

Nice!

BTW, you could make this a bit more plug-n-play by adding a gatsby-browser.js file where you import the mermaid package (or if that doesn't work, gatsby-ssr.js can add the script tag to the HTML).

@konsumer
Copy link
Contributor Author

konsumer commented Nov 15, 2017

I like the idea. mermaid uses client-side DOM api to make the SVG, so I'm not sure how to import it into the client-side code. Do you have any suggestions?

@konsumer
Copy link
Contributor Author

Will this work If I just do this in my index.js? Awesome. Much better solution.

@KyleAMathews
Copy link
Contributor

Add a gatsby-browser.js file. It has a number of APIs you can implement include the onCreateUpdate https://www.gatsbyjs.org/docs/browser-apis/

There's a bunch of plugins you can look at for examples https://github.com/gatsbyjs/gatsby/search?utf8=%E2%9C%93&q=gatsby-browser.js&type=

@konsumer konsumer deleted the patch-3 branch November 15, 2017 03:59
@konsumer
Copy link
Contributor Author

konsumer commented Nov 15, 2017

Added in gatsby-remark-graph@v0.1.1. Thanks for your help!

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

Successfully merging this pull request may close these issues.

3 participants