-
Notifications
You must be signed in to change notification settings - Fork 8
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
notebooks not building into the book #29
Comments
Hi Dani, Thanks for checking out the notebooks! We are currently in the midst of a transition into how we are going to serve/present the website and the notebooks content. If you simply want to use the notebooks then you don't need to the gitbook at all. In fact, it's very very unlikely you would want the gitbook at the moment as we are still in the middle of working out how we want to use it! So just clone the repo and point your Jupyter instance at the notebooks folder and you should be able to run through the notebooks. Soon the website will update and this will be explained a lot more clearly! Cheers! |
Thanks very much for your answer. I actually found the repo as the only example I could find of a gitbook project sourcing notebooks, and that's what I was trying to figure out. Did you manage to include them in the book project? Sorry for asking a marginally relevant question to the |
Thank you very much @patricksnape, it'd be fantastic to get this working! |
Hi @darribas! We don't build the gitbook based on notebooks (if I understand your question correctly). We write all the markdown files from scratch. Unfortunately, I haven't ever tried building a gitbook sourcing from notebooks. |
hey @darribas! So the first comment is that we have a far more updated gitbook over at menpo/book, this was just my early testing and proof of concept which @nontas has really ran with since. We haven't yet tackled integrating the notebooks into the gitbook yet, but it's definitely something we are looking to do. As I see it, there are two options, one easy but very limited, one difficult, fragile, but far more elegant from a UX perspective:
I think the second approach is the way to go long term, but it could be a little bit of an undertaking. I might have a hack on it sometime and share back on here if I have any success. I think there is probably broader interest in this though, so it might be worth spinning out any notebook/gitbook integration code into it's own little project that a community can work on (I could definitely imagine future notebooks breaking existing formatting etc, so it would be nice to share the burden of keeping up to date with changes). How were you thinking of tacking this @darribas? Would love to collaborate on a solution if it's something you are keen to push forward with! |
Thanks very much for the answers! @jabooth my original idea was along your option 2. I've pinged the I'm keen to get this to work, and I agree more people would be interested in this. I don't have much experience in rolling out plug-ins or packages and none in JavaScript so not sure I could contribute much in the form of a full-fledge package, but definitely interested in getting it to work (even if stlightly rough/manual in the beginning) and carefully documenting it so others more versed in the packaging can do that part. |
Ah that's awesome, didn't realise there was a
That's true, but you are free to mix HTML markup in the markdown files. For instance, the top of our new homepage uses some HTML at the top in order to style a centralised image: <center>
<img src="logo/menpoproject_white_medium.png" alt="The Menpo Project" width="30%"></br>
<strong style="font-size: 250%">The Menpo Project</strong>
</center> I'm not sure what the limitations on this are, but my feeling would be that's much easier to develop a solution for this that is simply written in Python and outputs valid markdown files for gitbook to process, without requiring any change at all on gitbooks part. I also feel that the template markdown file may well contain more stuff than simply the output from |
OK I've just tried with a notebook example and the results are encouraging but not perfect yet. If I do:
and plug
Other than that, it looks awesome and super simple. Any ideas @jabooth ? |
@darribas awesome! Any chance you can put a demo of this live somewhere so I can take a look at the HTML? Few thoughts:
This does look really promising though for a first bash though! Does the open street map widget come though OK?! Based on this it seems like we might be able to get a really nice solution pretty quicky 👍 |
I've just pushed my experiments into a repo:
Let me know if you make any progress, super keen on getting this done :) It'd amazing if we could iron out those small kinks!!! |
Don't convert to HTML - convert it to markdown using nbconvert: I just tried it on your repo and it looks much better and the images actually work correctly and code is syntax highlighted. |
Whoops, didn't realise markdown was a valid target! That's nice. Does the notebook look themed then, and fit in with gitbook @patricksnape? If so job done! |
There's not theming at all, it's just markdown! |
I vaguely remember trying that out yesterday and not fully working, but I might have done something wrong... At any rate, markdown does imply simplification so some things might get lost. It should however pick up python... |
Actually just tried and I think it works really well!!! The only problem is rich displays from the notebook. So, for example, an iframe cell does not render. However, I think it should render without problem if it's part of a markdown cell. This might be it indeed!!! |
One follow up question: have you tried to host books on github pages? I've tried to look at the static version created under |
You may need to do something like this? |
Hi,
I've clone this repo, got the
gitbook
setup and built it but the website only pulls in the markdown files, not the notebooks. Am I missing something or the book doesn't currently include the notebooks?Thanks very much!
The text was updated successfully, but these errors were encountered: