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

[Discussion] Embed animated examples in markdown #336

Closed
wants to merge 1 commit into from

Conversation

bvaughn
Copy link
Contributor

@bvaughn bvaughn commented Nov 24, 2017

Relates to gatsbyjs/gatsby/pull/3012

This PR shows how we could use the new gatsby-remark-embed-snippet plug-in I made to extract some of our more complex examples from markdown to external files that could be formatted by Prettier. The new gatsby-remark-embed-snippet plug-in also supports a simpler way of specifying highlighted lines (see here) that I'd like to see added to the gatsby-remark-prismjs plug-in as well so that we could use this for inline code-comments too. (I've proposed this to Kyle.)

I don't think we should move all (or even most) examples from markdown to the examples folder- but I do think it would be nice to be able to do for some of the larger examples, or the ones that we repeat throughout the site in multiple places.

I've temporarily embedded the gatsby-remark-embed-snippet plug-in in this PR temporarily (since it hasn't yet been merged to Gatsby). I just updated a single markdown file, content/docs/addons-animation.md, for example. You can see the resulting output here: deploy-preview-336--reactjs.netlify.com/docs/animation.html

@reactjs-bot
Copy link

Deploy preview ready!

Built with commit 5369ebe

https://deploy-preview-336--reactjs.netlify.com

@bvaughn bvaughn changed the title Embed animated examples in markdown [Discussion] Embed animated examples in markdown Nov 27, 2017
@facebook-github-bot
Copy link
Collaborator

Thank you for your pull request. We require contributors to sign our Contributor License Agreement, and yours has expired.

Before we can review or merge your code, we need you to email cla@fb.com with your details so we can update your status.

jhonmike added a commit to jhonmike/reactjs.org that referenced this pull request Jul 1, 2020
* First translation

* Apply suggestions from code review

Co-Authored-By: Jhon Mike <jhon.msdev@gmail.com>
Co-Authored-By: Aline Cavalcante <53158661+myialine@users.noreply.github.com>

Co-authored-by: Jhon Mike <jhon.msdev@gmail.com>
Co-authored-by: Aline Cavalcante <53158661+myialine@users.noreply.github.com>
@facebook-github-bot
Copy link
Collaborator

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

BetterZxx pushed a commit to BetterZxx/react.dev that referenced this pull request Mar 21, 2023
@BartoszKlonowski
Copy link
Collaborator

Hello @bvaughn!
I don't think this is any longer required as the react.dev has it's examples embedded in whole different manner making this PR no longer valid.
Let me close it, but thank you for the work and contributing to the docs!

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

Successfully merging this pull request may close these issues.

4 participants