jupyter-book: nested subfolders are not found by 'jupyter-book toc' if no files are in each level

my folder structure was something like

- mybook
   - notebooks
      - chapter1
         - notebook1.ipynb
         - notebook2.ipynb

running jupyter-book toc mybook didn’t find the notebooks. Once I added an ipynb file into the notebooks folder, it worked.

Not sure if that’s intentional.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 18 (18 by maintainers)

Most upvoted comments

OK - a couple quick thoughts:

when I clone and try to build your book, I also get error/warnings but different ones. Mine are:

WARNING: toctree contains reference to document '03-unsupervised_learning/aml-11-calibration' that doesn't have a title: no link will be generated

and I think that’s because many of your content files don’t have titles inside them. Right now the title: field of the toc.yml file will over-ride the title in the navigation bar, but it doesn’t set the title…you’re still expected to have the title in the page itself. This feels confusing to me now that I see it…

For the errors you’re reporting, I do suspect it might be an issue with (I’m assuming) windows. I actually run Windows myself so I can give it a shot probably tomorrow (I use WSL, so even though I have windows, I don’t have a development environment set up in it)

One thing that comes to mind - I feel like we should ask people to put / in their _toc.yml files regardless of the OS. If we make the behavior of / change between OS’s (at least when it comes to file paths) then we might be opening up a can of worms with CI/CD systems on repositories that were built with windows

In case you want to have a look: https://github.com/amueller/Machine_Learning_in_Python

I removed the index files and I had the same problem btw. I wonder if there’s a path issue, I’m on the OS that uses backslashs.