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

Github Gists are already Supported! #103

Open
ELC opened this issue Jan 25, 2019 · 0 comments
Open

Github Gists are already Supported! #103

ELC opened this issue Jan 25, 2019 · 0 comments

Comments

@ELC
Copy link

ELC commented Jan 25, 2019

I was experimenting a bit and it isn't necessary to create a Github Repo, instead, one can create a Github Gist and use it.

To achieve this, follow this format in the nbinteract.json file:

{
    "spec": "{username}/{gist ID}/master",
    "provider": "gist"
}

The only problem is that using "provider" in the json file doesn't update the provider in the HTML. So in the HTML instead of having

var interact = new window.NbInteract({
      spec: '{username}/{repo}/master',
      baseUrl: 'https://mybinder.org',
      provider: 'gh',
    })

The code generated should be:

var interact = new window.NbInteract({
      spec: '{username}/{gist ID}/master',
      baseUrl: 'https://mybinder.org',
      provider: 'gist',  <- Read from nbinteract.json
    })

I've already tested changing the value in the HTML manually and it works without problems. I think that changing the code to perform this shouldn't be much complicated but until it's done, the manual change works.

I find this method much more practical since one shouldn't want to create a separate repo for each notebook or more convoluted alternatives (such as having unrelated notebooks in a common repo to achieve the same)

@ELC ELC changed the title Add Support to GitHub Gists Github Gists are already Supported! Jan 25, 2019
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

1 participant