-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Introduce jupyter notebook format (ipynb) #456
Conversation
Jupyter simply outputs JSON, doesn't it? You should be able to extend the JSON loader to cover Jupyter files. |
Yup, it's just JSON as the file format. Where should I be setting gatsby to pick up the |
Unfortunately the only way to do that is as you've done. V1 will make this I'll make a new release in the morning.
|
Cool, I installed the latest alpha and I look forward to the morning release. Happy to make this an awesome way for people to write sites with notebooks, whether an extension point or a built in. |
I'll probably end up wanting to do the same with RMarkdown as well ( |
Cool — it's not that big of deal to do this. And 1.0 is coming along so hopefully will hit stable in a month or so and then we can just move things over there. |
Oh... yet another place where file types are defined https://github.com/gatsbyjs/gatsby/blob/master/lib/utils/page-file-types.js I'll just add that after merging. Really looking forward to dropping all this w/ 1.0. It works but it's a pain to extend as you've found. |
Thank you so much! |
I'll work on a default rendering setup, though we can likely use https://github.com/nteract/notebook-preview as is. |
A starter demoing this would be great! On Thu, Sep 22, 2016 at 12:17 PM Kyle Kelley notifications@github.com
|
What's the best way for me to test/evaluate this now? I can write a wrapper (like I started to before making this PR). I'm not sure how to use a dev copy with a site. |
https://github.com/gatsbyjs/gatsby/blob/master/CONTRIBUTING.md On Thu, Sep 22, 2016 at 12:21 PM Kyle Kelley notifications@github.com
|
Also just published 0.12.9 |
Woo, got this to load ipynb files when using However, the React component I set up for notebooks relies on CSS variables being set via a theme:
When webpack gets to this, it says the variables are undefined when dealing with main.css.
These work well in our app, though I've never used them in a webpack setup with PostCSS. Happy to open an exploratory PR so you can see things in action on |
Huh, I don't have any experience with variables in PostCSS — can anyone else help out? Perhaps you just need to import the theme first? Or maybe you have to import the theme inside main.css? And yeah, if you don't want to create your own starter, adding a page in the default starter would be 👍 |
Yeah, I'll hack around it. I tried importing the theme first, no luck. In reality, I'd want to defer to the "theme" of the blog itself to style the notebook components. |
Inline styles are nice — just keep everything in Javascript. |
Hey guys, Any official support/starter code for Jupyter notebooks? I'm working on a blog where I'm planning to add support for rendering notebooks. I tried converting the notebook to markdown which failed to render things like tables well. |
Yeah! Check out https://github.com/nteract/nteract/blob/master/packages/gatsby-transformer-ipynb/README.md Cc @benjaminabel |
Jupyter (née IPython) Notebooks are a format used by data scientists and others to communicate their work along with a live REPL.
Example notebook on GitHub
I don't know if you actually support the idea of new file extensions here - I wasn't sure how to extend it. I see how to override current loaders (for JSON or Markdown e.g.), just not how to set other file types.