executablebooks / jupyter-book

Create beautiful, publication-quality books and documents from computational content.
http://jupyterbook.org
BSD 3-Clause "New" or "Revised" License
3.76k stars 652 forks source link

File path on toc does't seem to work when pointing outside of book folder #2124

Open HealthyPear opened 4 months ago

HealthyPear commented 4 months ago

Describe the bug

context

I am building a book from jupytext py:percent files stored in a src folder outside of the book folder

expectation I expected it to work since the documentation of the file TOC key reports

A path to a file that contains the content for a chapter / section. These paths are relative to the root: document.

bug [...]/book_example/intro.md:: WARNING: toctree contains reference to nonexisting document '../some/path/notebook_name' [etoc.ref]

$ jupyter-book build mybook

Reproduce the bug

make a directory structure like so

├── book_template
           ├── _config.yml
           ├── _toc.yml
           ├── intro.md
├── notebooks
           ├── some
                         ├── path
                                       ├── notebook.py

and build a book as per documentation

List your environment

Jupyter Book      : 0.15.1
External ToC      : 0.3.1
MyST-Parser       : 0.18.1
MyST-NB           : 0.17.2
Sphinx Book Theme : 1.0.1
Jupyter-Cache     : 0.6.1
NbClient          : 0.7.4
sjspence commented 3 months ago

I also observed this behavior.