[fastpages] - Does repo need to be public to build properly?

I’ve created my repository from template, and I’ve took steps outlined in pull request. Still I don’t see anything in my github pages.

Am I missing something? I’ve seen that there is an example notebook in _notebooks directory, but I when I go to my github pages /blog I don’t see anything.

Yes your repo needs to be public to use GH Pages, unless you’re a paid customer of GitHub.

2 Likes

Worth mentioning that GitHub Pages themselves are public whatever you may do - i.e. even if you are a paying customer with a private repo. Since I was sharing internal workplace data, I ended up setting up my own Jekyll server.

1 Like

Good news for those using nbdev at work:

It looks like GitHub’s public roadmap lists that GH Pages will work for Private Access in Q4 2020 (that’s Oct-Dec).

This is only for repositories under an :dollar: Enterprise Plan :dollar: in GitHub.

1 Like

And as of a month or so ago, it is implemented! And works really nicely.

2 Likes

@yegeniy can you share a bit more about your experience? For example did you need to change anything to make this work on private pages ? Thanks

1 Like

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 :tada:) anchor links.
You can also see an example of hovering over a broken link

1 Like