Following the directions in the GitHub changelog entry was enough to get private GitHub Pages working.
But for an nbdev-based repository, also make sure to follow the directions here and make sure to also update your settings.ini
file. Change the “Source” in the GitHub Pages settings to use the generated docs/
subfolder. If done correctly you should see something like this in your repository settings:
My goal was limited to being able to share notebooks links from private repositories among colleagues. And this approach renders much faster and more consistently than GitHub’s jupyter notebooks viewer. Most importantly, linking to specific headings (#anchor-name
) within the notebook works.
Since I just followed the “default” approach, there were a few problems with the way the generated pages rendered. In general, please make sure to also update your settings.ini
file to avoid these problems.
- I used an older version of nbdev from about a year ago. nbdev has some configurations in settings.ini for GitHub Pages specifically, and I didn’t touch these. It could be that these issues are completely avoidable.
- The links, such as those in the generated table of contents, are broken. Instead of linking to
/core
, the generated documentation links to/repo_name//core
. I’ve run into issues with links rendering differently in GitHub Pages and in GitHub’s markdown rendering in the past. So it might be totally avoidable. - The actual “Jekyll Theme” didn’t seem to have shown up. I saw that recent nbdev versions bundle the Jekyll theme into nbdev, so maybe that helps.
Below is an example of how it looked:
Note that I used an extension to render the (working ) anchor links.
You can also see an example of hovering over a broken link