New Feature: Binder Badges

New Feature: Binder Badge Added By Default

via https://github.com/fastai/fastpages/pull/216

  • Binder badge appears by default along with GitHub and Colab badges
  • If you don’t want a particular badge to appear on your page, there are several options:

Screenshot:

Option 1: Override Site-Wide Defaults

in /_config.yml, set the appropriate value to false, which will change the default set of badges that show up on each site.

default_badges:
  github: true
  binder: true
  colab: true

Option 2: Hide a Badge on an Individual page

If only want to hide a badge on an individual post, you can set the front matter hide_{github,colab,binder}_badge: true. For example, if you wanted to hide the Binder badge for an individual notebook but you want the other badges to show up, you can set this in your front matter:

- badges: true
- hide_binder_badge: true

If you do not want to show any badges on an individual page, you can just set badges: false.

Important Notes

  • I do not include a default environment by default. I let the user configure that themselves.
  • In the absence of this, I let Binder uses whatever default that it normally uses for dependencies. This keeps this repo lightweight such that I do not have to worry about dependencies.

All of this is documented in the README

6 Likes

Thanks for release of this new feature. This would be very helpful when creating interactive notebooks. However, will it be possible to make the blog post directly interactive using Binder or nbinteract?

I am not sure about this, as GitHub pages can ultimately only serve static sites (any interactivity must be done on the client side). There may be a way, but not something I"m confident enough in to promise at the moment.

Ok then. It seems like nbinteract can run on GitHub pages but I don’t know the details behind it.

Basically, it would be amazing if I could do either of the two things:

  1. Run the notebook directly in the website
  2. Have interactive elements of the notebook that will, say, rerun an analysis or model based on parameters given.

It seems like nbinteract provides this level of interaction, but I am not completely sure.

Anyway it’s just an idea that I had… Hopefully this is something that can be implemented as part of fastpages but if not, I completely understand…

1 Like

Yes nbinteract is a possibility. I’m doing research into solutions that are:

  • Easy to setup
  • Are fast / dont lag
  • Fail gracefully
  • Well maintained
  • Free (if not free, then could consider but that’s a special situation)
  • Based on open source tools

If you find something and prototype it end to end let me know! I could use the help :smiley:

1 Like