jupyter-book icon indicating copy to clipboard operation
jupyter-book copied to clipboard

change in _toc.yml + rebuild doesn't change TOC on the left side of unchanged chapters

Open K-Becher opened this issue 2 years ago • 1 comments

Describe the bug

context When I change the table of contents in the _toc.yml file (for example adding a chapter to a part) and I rebuild the book, on every page/chapter I didn't change in the meantime after the last build, the TOC displayed on the left side is still the same as before.

expectation I expected (or hoped for) a rebuild of all pages to occur. As the table of contents/menu is displayed on every page on the left side, I thought it should be updated accordingly, even though the content of the single pages itself did not change.

bug But instead it didn't happen this way. It does make sense, the source files didn't change, but for me the TOC is part of every chapter in a way or let's say it's about the structure of the entire book, so it seems reasonable that a change inside the _toc.yml should result in a rebuild of all chapters.

problem This is a problem for people building their book incrementally because they might not notice at first that something is missing. Of course there is an obvious solution to this: use the --all option after a TOC change. But it's also easy to forget about that even if you know about the issue. So I thought I could mention this after running into it a few times.

(This is my first issue ever, so: sorry if I made any mistakes! Anyway, I really like this project, thank you for the good work!)

Reproduce the bug

  1. create _toc.yml and at least one source file as example chapter
  2. build book
  3. change _toc.yml (e.g. add new chapter)
  4. rebuild book
  5. look at built html file of example chapter:
  6. TOC on the left side is unchanged

List your environment

jb --version
Jupyter Book      : 0.13.0
External ToC      : 0.2.4
MyST-Parser       : 0.15.2
MyST-NB           : 0.13.2
Sphinx Book Theme : 0.3.2
Jupyter-Cache     : 0.4.3
NbClient          : 0.5.13

K-Becher avatar Aug 09 '22 19:08 K-Becher

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

welcome[bot] avatar Aug 09 '22 19:08 welcome[bot]