[fastpages] GitHub Pages Blog Using Nbdev

For those of us that don’t do keygen on the web… :wink:

How to Create Deploy Key on the Command Line

1 Like

The little things in this thread and elsewhere should be collected more densely on (a) how-to / faq / tips+tricks page(s). Even if you read this thread, finding things again is hard.

Another thing is taking confusion out of the docs. Maybe just separate MD and NB sections as a whole, and have the same subtopics in both (because you need the info on the format you use right now, not both at the same time).

Regarding the MD vs NB thing, what also tripped me up was that the ![](imgpath "caption") thing does not work in NB and leads to failures. There should be a warning in the docs.

And I have a hard time getting metadata to work (with MD): the docs say make a list with dashes, the example post has no dashes. If I try to add / change things, the post disappears without any way of diagnosing the problem. There’s a lot of wiggle room for a better UX here. :wink:

Later: And it is official, metadata in MD does not work, at least for me. Tried a NB post and suddenly my metadata is used.

Another one for the docs: very likely if your timezone does not overlap with that of the build machines, your post from “today” is “tomorrow” for the build machine – i.e. your post disappears because not ready for publishing yet. At least that is what I assume as the cause.

@jhermann you should name your file correctly to avoid this let me know if this doesn’t help…perhaps I should subtract more time from the modified date

https://github.com/fastai/fastpages#automatically-convert-notebooks-to-blog-posts

@jhermann saying something doesn’t work without anything else is not that helpful for maintainers, and also can make it harder for other people to find useful information on the forums. May I kindly suggest providing the following minimum information if something doesn’t work:

  • Links to your posts that are not working on GitHub
  • Steps you took to try to troubleshoot (Like seeing the logs in the development environment, when you try to run the blog locally
  • Steps to reproduce the problem

The below statement is again not helpful, as that works here: https://fastpages.fast.ai/fastpages/jupyter/2020/02/21/introducing-fastpages.html#Images-w/Captions, so it is impossible to debug from the statements you are providing and its impossible to tell if this is a user error or something else.

Please don’t take this the wrong way, this is some feedback that might smooth things out as you interact with open source projects. When feedback is not actionable or accompanied by minimal information, it can appear as just complaining ( which I assume is not your goal )

2 Likes

Happy to take a pull request if you might be up for doing the honors of collecting information you have found for an FAQ :wink:

Well, with all the back and forth getting over the initial “make things work” hump it was not that easy to always provide coherent info – during the last hours, I had to navigate out of dark corners and guess a lot on what the system might do or not do.

Anyway, those things that I could solve / find out so far are collected here for now – later on, that can be moved to more visible places.

1 Like

@nok I agree with you. I have implemented this in https://github.com/fastai/fastpages/pull/126

1 Like

Is there a way for a personal repository to be updated automatically with changes from the original fastpages repository, so we can make use of the latest features as they come?

1 Like

Not yet, that is on the todo list :slight_smile: It’s not clear to me on how to do it in a way that is easy for users, still trying to figure that out

2 Likes

Also do you think it is possible to create fully interactive notebooks (not just Altair), perhaps using something like Binder or nbinteract?

1 Like

It support colab already.

My way is Updating the fastpages Template – YMMV regarding this being simpler than a full template reboot. I think so. Also not automatic, just git-assisted.

More automation / less chance of rejects can be achieved when the diff is filtered using the list of .md files in _config/exclude (you don’t really need those updated). A script that prepares the changeset for a human to inspect, possibly resolve, and finally commit could be added to the template, including automatic tracking of the last synced commit.

This is a great suggestion. I have put this on my backlog to look into. Attaching binder has come up several times.

Opened an issue to track here: https://github.com/fastai/fastpages/issues/128

1 Like

We’ll be teaching deployment of prototypes with Binder in the book and course, BTW, so this will fit in well with what fast.ai students will be studying.

3 Likes

I feel your pain. I am taking some rest fastpages to catch my breath but this is one the first things I will work on next. I am sorry that the upgrade process has not been easy so far. Thanks so much for providing feedback. If anyone has any ideas on the most pain-free way to upgrade please free to suggest them here: https://github.com/fastai/fastpages/issues/77

It’s not completely obvious to me what the best route is, especially when there are merge conflicts. I can see two paths:

  1. EASY: Copying the posts into the updated file structure, any customizations to HTML or CSS will be lost.
  2. ADVANCED: Opening a PR but user has to deal with all the merge conflicts, which can be easy but can also be difficult depending on the kind of conflicts. I work at GitHub and this can be confusing for me, sometimes, too.

Any ideas or thoughts on the best way to handle this or how to best set this up for users is much appreciated. My gut feeling is to tackle the easy case first, and perhaps an idea will come forth on best way to tackle the advanced case for everyone.

This is fixed by https://github.com/fastai/fastpages/pull/130

Another option for getting master updates is to add a remote: https://stackoverflow.com/questions/56577184/github-pull-changes-from-a-template-repository/56577320. There will be still merge conflicts though.

Steps for updating fastpages changes:

1. Add fastpages as template or any name you define

git remote add template https://github.com/fastai/fastpages.git

2. When you want to update fetch all from template

git fetch --all

3. Merge fastpages master with your blog master

git merge template/master

4. Most probably there will be merge conflicts fix them but be careful don’t change files like _config.yml. Accept only functional incoming changes not things that might affect your custom input.

3 Likes

I also added these lines to Dockerfile for grammar check extension:

RUN pip install jupyter_contrib_nbextensions
RUN jupyter contrib nbextension install --user
RUN jupyter nbextension enable spellchecker/main

from this blog

This has been fixed by https://github.com/fastai/fastpages/pull/132

@kcturgutlu please confirm it works for you, I forked your repo and tested it to make sure it worked, but please check just incase.