We would love to your input, and have you try it out! Please give it a go!
Bad News: We recently took all the automation out. Because we found the extra setup steps required to make this work properly (creating an SSH key, adding it to your secrets, etc may be too cumbersome and confusing for beginners).
Good News: We are rebuilding a âpower userâ version of fast_template, called fastpages with all of the Automation and more exciting features. We are building it from the ground up to be automated and modular enough so you can take the automation to any other Jekyll theme of your choice. The reason for doing this is it will allow us to have the following features:
Automatic Jupyter / Word doc to blog post conversion without making your local copyâs master branch out of sync (which would otherwise require you to keep pulling before committing).
More transparent build status of your GitHub pages - you will get to see the full logs
Jupyter blog posts retain interactivity where possible (ex: Altair Charts).
Additional CI and Tests that will help both maintainers and users
Modularity such that you can take this automation to a different Pages theme, including any third party theme so you can customize the look and feel of your blog but still retain automated Jupyter and Word doc to blog post conversion.
This is an open thread to discuss the development of fastpages
Constraints:
We will probably stick with Jekyll, even there are more robust static site generators like Gatsby, in order to leverage the strengths of nbdev and the knowledge of this community.
Some preliminary ideas of things to discuss (Feel free to discuss anything else):
What plugins do we want ( might be good for testing purposes to know )
Are there any features that would be particularly useful for fastai students?
What CSS to include? Perhaps we drop Primer and use something more lightweight that doesnât clobber other themes. We could, for example, borrow some of the css you are using for the docs sites that allow for the useful things like callouts and such. ( I think it is defined here).
Ideas for tests: The only kind of tests I can think of is to kick off a jekyll build (without committing the build) and see if that provides an error - this might help catch errors on PRs to the template.
Some initial thoughts on areas we need help (feel free to propose more):
Adding collapsable code cells ( would need a contribution to nbdev to enable this )
Adding support for other interactive charting libraries like bokeh
Make code highlighting prettier
Make notebook rendering prettier in general
More integration between nbdev and fastpages, such as for showdoc and jekyll notes ( I donât think its compatible because the CSS is not compatible, perhaps someone that is good at that kind of thing might be able to help)
More tests, CI to help maintainers catch errors, a way to see a preview of the website from PRs so we donât have to clone forks and preview
Adding documentation
Those are the things I can think of off hand, but will keep adding to this list as I think of more. Feel free to jump in and add suggestions on things you would like to see!
Hi @chansung18, Iâm working on setting up tools for easy local preview, will be doing that next week. Right now you have to call bundle exec jekyll serve (See these docs https://jekyllrb.com/docs/) to test locally.
Happy to take PRs for other things or suggestions, if you know of any other tools that may be helpful. Do you often want facebook embedded posts in your blog?
I am trying to convert notebook to post in my local environment.
As far as I understand, nb2post.py under _action_files directory does this.
However, when I run it python nb2post.py from the root directory, I get a message like below.
converting: _notebooks/test.ipynb
Use `Config.create` to create a `Config` object the first time
And it doesnât create a post for me.
How could I test nb2post feature locally?
You are right, but I just use nbdev library from pip install.
It means it doesnât matter which version I have.
All I do in fastpages's nb2post.py is calling notebook2html function defined in nbdev.
Underlying procedure should work fine since I got nbdev from PIP.
Into to directory from where you are running nbdev. These are part of the little things I plan to automate next week or make easier for users to develop locally ⌠but since you are ahead of the game I think thatâs all you need to get it started!
Please let me know if you run into any more issues
I got it working fine now!
one issue is that settings.ini seems to be placed under the root directory not _action_files for now. (even though there is a separate settings.ini in _action_files directory.
@chansung18 Yeah that was just a hack to get you started, the automated system uses the settings.ini file in _action_files/
Next week I will be preparing a shell script with a docker compose, etc. that will put you into a development environment with one command and everything pre-loaded.
Great work @hamelsmu thanks!
There is indeed a typo in the deploy-key link, I made a PR earlier.
One other note is the convert-docker-compose.yml which exposes port 8888 - not sure itâs needed. And if you run a local jupyter notebook it is sort of in the way. As far as I can see, the port is not needed - can it be removed or uncommented?
Follow these instructions to create an ssh-deploy key
I was expecting a link there like the one at the 5th point but I noticed the latter point out to the instructions mentioned in the 4th point if I understand it correctly
Hmm re: port 8888 I left it open incase someone wants to start a Jupyter notebook inside the container, but now that you mention it I donât think its obvious. Iâll make a PR with an explicit command and get your review on it