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

Published iPython notebooks do not display properly if already logged in #5

Closed
williamstein opened this issue Jun 7, 2015 · 3 comments

Comments

@williamstein
Copy link
Contributor

plan: when opening a static html file, if it was generated by nbconvert, just render it. Simple as that.

See sagemathinc/smc-public#1 for a discussion.

@haraldschilly
Copy link
Contributor

I went through the content of such an HTML file but wasn't able to find a reliable string to detect it. Instead, I have this simple idea: after rendering via nbconvert, replace the first line of the HTML (the doctype tag) with:

<!DOCTYPE html>
<!-- generated by nbconvert -->

and detect this when displaying the HTML page.

Another strategy could be to search for an existing ipynb file with the same basename: i.e. if <basename>.ipynb exists in the same directory -> show html.

@williamstein
Copy link
Contributor Author

Another strategy could be to search for an existing ipynb file with the same basename: i.e. if .ipynb exists in the same directory -> show html.

One small problem with this is that it will further slow down opening the file... I like your generated by nbconvert idea; that could even get upstreamed...

@williamstein
Copy link
Contributor Author

No longer a problem since we no longer have this .html business.

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

No branches or pull requests

2 participants