Allow for disabling of nbviewer
See original GitHub issueCurrently, all notebooks from Github show a preview using nbviewer.
In some situations this causes a “404: Not Found” message, even though everythign is correct (e.g. when trying to launch a file that is wrapped
inside a Docker image).
For example: https://mybinder.org/v2/gh/crestdsl/crestdsl-demo-binder/master?filepath=GettingStarted.ipynb launches a notebook that is not in the repo, but in the Docker image that is launched by the repo.
I believe that providing an url-argument e.g. &preview=false
could be useful in these situations to disable the preview (so users aren’t confused).
The concerned code places (as far as I see) are the ParameterizedMainHandler
in main.py, where it would be necessary to extract the argument and pass it to the loading.html
template. Code to add should be something like preview=self.get_argument('preview', True)
.
The other part is in the template itself (e.g. near Line 27 ) where a {% if preview %}
can be added. (Line 30 already contains a condition that could also be easily extended…)
This issue is to allow feedback / opposition before starting implementing. Thus:
- What do you think?
- Is my current though process correct? or is my “very simple” solution not as simple after all?
PS: lacking time right now, so PR will come in a few weeks earliest.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:12 (6 by maintainers)
Top GitHub Comments
With #934 we now don’t show the preview if it would contain an error so I’ll close this issue.
Sorry, GitHub Enterprise. GitHub, but set up by enterprises, ordinarily not available from the internet.