executablebooks / sphinx-external-toc

A sphinx extension that allows the site-map to be defined in a single YAML file
https://sphinx-external-toc.readthedocs.io
MIT License
33 stars 18 forks source link

Issue when using "search" as a filename #16

Open mmcky opened 3 years ago

mmcky commented 3 years ago

Describe the bug

When building html it seems that if you use search as a filename -- sphinx replaces it with a search page and ignores the content in that file. Perhaps this is a reserved additional page for sphinx?

If _toc.yml contains:

- file: search

the issue occurs.

However if the file is nested in a folder there is no issue.

- file: folder/search

also other names such as my_search don't face the issue.

A minimal example is available here

To Reproduce

Clone minimal example

and jb build ./

with html

Expected behavior

Either a warning for using a special filename or use the user provided file.

Environment

▶ jb --version
Jupyter Book: 0.8.2
MyST-NB: 0.10.1
Sphinx Book Theme: 0.0.37
MyST-Parser: 0.12.10
Jupyter-Cache: 0.4.1
NbClient: 0.5.0
choldgraf commented 3 years ago

ah yeah - I feel like this is an annoying Sphinx bug that has bitten me before too. Perhaps a warning is the right way to go here, so that users know why things are breaking 👍

mmcky commented 3 years ago

I think another one -- but a lot less likely to occur is genindex

AllenDowney commented 2 years ago

This issue just took a couple of hours of my life that I won't get back, so it might be worth a warning :)

mmcky commented 2 years ago

thanks for the feedback @AllenDowney -- sorry about the lost hours. Love your books! I'll see if we can put a warning check in place for this into jupyter-book as a reserved filename.

AllenDowney commented 2 years ago

Thanks, @mmcky !