-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Support render .ipynb file as a new feature #4281
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
Conversation
This is done through 2 main steps:
- Adding new extension "ipynb" as external handler. This also requires
`jupyter` and its converter, but can gracefully fall back to raw content.
- Add an alternative parser, only for .ipynb type, because .ipynb file
is one whole JSON object. That will have different proccessing than parsing
JSON frontmatter.
The frontmatter for .ipynb is expected in the "metadata" of the notebook:
```
{
"metadat":{
"frontmatter": {
"title": ""
}
}
}
```
|
At the moment, I think placing the {
"cells": [],
"frontmatter": {},
"metadata": {}
}I am happy to get any feedback. And if anyone knows the best place in the document to write this in, I will gladly update the docs as well. |
|
Thanks for this. The code looks good, but as I have no idea what ipynb is, I don't know whether this is worth adding to Hugo. I suggest you create a thread at https://discourse.gohugo.io/ to discuss the use case before creating any more code. |
|
Thanks for the feedback on my PR. I also notice the fact that this PR proposes a whole different flow of processing content file. Taking the discussion to |
|
Hi @bep , I use an old thread to discuss about the change I propose in this PR: I am eager to implement the change that we are discussing. Would you like to join us and give us some feedback? |
It's a jupyter notebook file. You can mix computations and markdown, and the outputs are saved in the file. See, for example, this article in Nature, which notes that GitHub has more than 2.5 million ipynb files. GitHub, GitLab, Nickola, Indico, and others all support rendering this file format. Not sure if this PR is the right way to do it, but it would be a great way to write blog posts for anyone in the sciences! |
|
Thanks for creating this awesome one-stop-shop to easily write, generate and publish static websites - I enjoy using it for my website. I am writing to ask you to add ipynb as a first class citizen to hugo. I would be happy to resume work on this branch and settle merge conflicts, where necessary. I would like to use it and I think having native support will solidify hugo's popularity for people, who primarily work in notebooks. Jupyter is the literate programming paradigm for the scientific community, which is increasingly growing in popularity in academia, machine learning, data science and data exploration. There are several plugins written by keen users of jupyter and Hugo, so we are not the only people keen on this feature: I am a user of org-mode and I think that since Hugo supports org-mode, it only makes sense to support jupyter as well. |
|
What's the update on this? It would be really cool if this was added. |
|
any update on this? I like this feature because I have many notes written in |
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This is done through 2 main steps:
jupyterand its converter, but can gracefully fall back to raw content.is one whole JSON object. That will have different proccessing than parsing
JSON frontmatter.
The frontmatter for .ipynb is expected in the "metadata" of the notebook: