-
Notifications
You must be signed in to change notification settings - Fork 102
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
add jupyter notebook loader and custom template #210
Conversation
|
||
def render_notebook(content): | ||
nb = nbformat.reads(content, nbformat.NO_CONVERT) | ||
(output, resources) = nbconvert.HTMLExporter(template_file='./klaus/templates/my_full.tpl').from_notebook_node(nb) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my_full
? Confusing name :-D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just a little CSS modification of nbconvert template 'full', cause the width
in @media
setting of that template will make the html overflow the markup div
. The naming is not very clear, do you have any suggestions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see! In this case could we simply use the default template and add the CSS fixes to klaus' CSS file? Or if that doesn't work, can we use inheritance to override the CSS instead of copy-pasting the whole file?
Great idea, thanks for the patch! I'm worried about security though; does this execute any code on server side? Or is this view only? |
@jonashaag I think it's view only, to render the code and output in the *.ipynb (It's json format inside). |
repo_objs = [FancyRepo(path) for path in repo_paths] | ||
|
||
user_dirs = repo_paths | ||
repo_objs = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes seem unrelated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry! These changes are for my self usage. Didn't notice these commits will be related to this pull request. I've checkout a new branch and made a new pull request. It was my first time doing pull request, don't know if it's the right way 😃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#211 new request, I've moved some of your comments to there
In terms of security, XSS problems are possible at the least. So we have to account for that. Two ideas:
|
No description provided.