Jupyter-book: Docs binder hub duplicate?

Created on 22 May 2020  路  7Comments  路  Source: executablebooks/jupyter-book

The docs page has this:

# Configure your Binder links, such as the URL of the BinderHub.
binder:
  binderhub_url             : "https://mybinder.org"

which seems to conflict with this, a little further down on the page:

launch_buttons:
  binderhub_url             : "https://mybinder.org"  # The URL of the BinderHub (e.g., https://mybinder.org)

Also, quotes around URLs and strings are inconsistent on the page. I mildly prefer not having them, since it's allowed. But all in quotes is valid too.

bug documentation

All 7 comments

Good catch! we should replace binder: with launch_buttons: in your first example above.

re: the quotes...I must admit I'm still confused by when YAML cares about quotes vs. when it doesn't. But agreed we should standardize this

YAML doesn't care about quotes, except when it does. :) Basically, the places that must have quotes: YAML values (yes, no, etc) need quotes or they turn into bools, etc. And xxx:xxx is a valid string, but xxx: xxx is not, it's a mapping. That means URLs work 100% of the time, and strings usually work unless you expect users to put a colon followed by a space in them, or words like yes.

YAML doesn't care about quotes, except when it does. :)

ain't that the truth :-)

I know that @bmcfee had an issue with the text off...I wonder if that is a special-case in YAML as well?

Yes, that's another way to write false, and becomes a bool. (And yes, I've been bit by that one before, too ;) )

OK cool - I added this PR to try addressing this, WDYT?
https://github.com/executablebooks/jupyter-book/pull/622

I'll butt in here, and mention that I think 0/False/off are reasonable values for the case I ran into, and it wouldn't be terrible to support them without quotes. Assuming you're willing to handle a bit of type tomfoolery that is.

@bmcfee one step ahead of you: https://github.com/executablebooks/jupyter-book/blob/master/jupyter_book/yaml.py#L93 :-)

Was this page helpful?
0 / 5 - 0 ratings