Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot make an external URL the first item in the TOC #956

Closed
MaxGhenis opened this issue Sep 7, 2020 · 2 comments
Closed

Cannot make an external URL the first item in the TOC #956

MaxGhenis opened this issue Sep 7, 2020 · 2 comments
Labels
bug Something isn't working 🏷️ toc An issue related to the toc structure

Comments

@MaxGhenis
Copy link
Contributor

Describe the bug

When changing _toc.yml to make an external URL the first item:
image

I get this error:

Extension error:
Handler <function add_toc_to_sphinx at 0x7f1d88fa7550> for event 'config-inited' threw an exception (exception: 'file')
Traceback (most recent call last):
File "/usr/share/miniconda/envs/childallowance/lib/python3.8/site-packages/sphinx/events.py", line 110, in emit
results.append(listener.handler(self.app, *args))
File "/usr/share/miniconda/envs/childallowance/lib/python3.8/site-packages/jupyter_book/toc.py", line 192, in add_toc_to_sphinx
app.config["master_doc"] = _posix_no_suffix(toc["file"])
KeyError: 'file'

Environment

  • Python Version [e.g. 3.7.1]: 3.8
  • Package versions or output of jupyter-book --version: 0.8.0
  • Operating System: Ubuntu

Additional context
This wasn't an issue prior to 0.8.0, as the TOC didn't display the first item:
image

But in 0.8.0, that external link is no longer the topmost link, as I'd like:
image

@MaxGhenis MaxGhenis added the bug Something isn't working label Sep 7, 2020
@chrisjsewell chrisjsewell added bug Something isn't working 🏷️ toc An issue related to the toc structure and removed bug Something isn't working labels Sep 8, 2020
@choldgraf
Copy link
Collaborator

oops, missed this one - can you try setting

  home_page_in_navbar       : false 

That should let you exclude the home page and thus have your first link an external site

@MaxGhenis
Copy link
Contributor Author

Thanks that worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 🏷️ toc An issue related to the toc structure
Projects
None yet
Development

No branches or pull requests

3 participants