r3f-website icon indicating copy to clipboard operation
r3f-website copied to clipboard

Using github and codesandbox to host examples

Open gsimone opened this issue 4 years ago • 0 comments

I made a test using example apps stored in the main repository that are then converted to live sandboxes using githubbox

Preview:

https://hungry-liskov-659c72.netlify.app/docs/example-test/

Code:

https://github.com/gsimone/r3f-website

Doing it like this would allow us to better maintain examples:

  • keep examples PRable and contributable ( is that a word? )
  • keep dependencies up to date for all examples

It's a simple as pushing the example and using the github url in the iframe code:

<iframe
    src="https://codesandbox.io/embed/github/gsimone/r3f-website/tree/master/src/examples/example-name"
></iframe>

We could easily provide a default repo to clone new examples from.

Just an idea, let me know what you think - opened an issue since discussions are not on.

gsimone avatar Jun 30 '20 15:06 gsimone