html rendering

75 views
Skip to first unread message

Kristen Thyng

unread,
Sep 7, 2016, 2:57:52 PM9/7/16
to Project Jupyter
Hi! When I have an html file in a directory that my jupyter server can see, it shows up as editable. I found on the internet that you can get it to show up as rendered by replacing "edit" in the url with "files", and it works beautifully. While this is a very easy workaround, any chance this could happen by default, with maybe something like the "raw" option on github in case you actually want to see the unrendered html?

So you can the html file url from:

myhtmlfile/edit/file.html

to 

myhtmlfile/files/file.html

Thanks!
Kristen

MinRK

unread,
Sep 9, 2016, 7:07:52 AM9/9/16
to Project Jupyter

We’ve been thinking of separate ‘edit’ and ‘view’ links from the tree view, which would do this explicitly, but coming up with the UI for two links instead of one has prevented anyone from actually making the PR. The upcoming JupyterLab has an “Open With…” that makes this sort of thing much easier.

One workaround you can have is to have relative links to the html files in notebooks with relative URLs, which will resolve to the /files/ version, e.g.

[link text](relative/myfile.html)

-MinRK


--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/c2d766e8-c225-46e0-8b2b-ba9d656dea19%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Doug Blank

unread,
Sep 9, 2016, 7:40:03 AM9/9/16
to jup...@googlegroups.com
On Fri, Sep 9, 2016 at 7:07 AM, MinRK <benja...@gmail.com> wrote:

We’ve been thinking of separate ‘edit’ and ‘view’ links from the tree view, which would do this explicitly, but coming up with the UI for two links instead of one has prevented anyone from actually making the PR. The upcoming JupyterLab has an “Open With…” that makes this sort of thing much easier.

One workaround you can have is to have relative links to the html files in notebooks with relative URLs, which will resolve to the /files/ version, e.g.

[link text](relative/myfile.html)

-MinRK

Min, does this have an issue associated? I'd love to see this bumped up in priority so that a UI could be proposed and implemented. This is a hurdle for those that would like to use Jupyter to cover HTML in an educational setting, especially in a Digital Humanities-oriented course. It is also a problem when trying to return feedback to students from nbgrader. (Nbgrader produces HTML, but there is no easy way for the students to render it even if you copy it into their folders on Jupyterhub.)

Regarding a UI: it seems like it would be easy to put two additional buttons next to [Rename][Duplicate] when a file is selected. I imagine [View] and [Edit].

-Doug

 

On Wed, Sep 7, 2016 at 8:57 PM, Kristen Thyng <kth...@gmail.com> wrote:
Hi! When I have an html file in a directory that my jupyter server can see, it shows up as editable. I found on the internet that you can get it to show up as rendered by replacing "edit" in the url with "files", and it works beautifully. While this is a very easy workaround, any chance this could happen by default, with maybe something like the "raw" option on github in case you actually want to see the unrendered html?

So you can the html file url from:

myhtmlfile/edit/file.html

to 

myhtmlfile/files/file.html

Thanks!
Kristen

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/c2d766e8-c225-46e0-8b2b-ba9d656dea19%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.

Kristen Thyng

unread,
Sep 16, 2016, 7:29:32 PM9/16/16
to jup...@googlegroups.com
Min – That makes sense, though I'm wary to put in the work to do that for each student, or to figure out how to do it in a quick way for all students at once. For now I think I will just tell them how to view it themselves since I'm already putting in a lot of time on other things for this class! Thanks for the suggestion.

Doug – What you say about nbgrader is my use case, in fact. I have the feedback moved over to the student directories, but it is there just as html files, not listed in notebooks.

Thanks again,
Kristen

--
You received this message because you are subscribed to a topic in the Google Groups "Project Jupyter" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jupyter/bgP6NRmrLcM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jupyter+unsubscribe@googlegroups.com.

To post to this group, send email to jup...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Kristen M. Thyng
Assistant Research Professor
Department of Oceanography
Texas A&M University
Reply all
Reply to author
Forward
0 new messages