Jupyter-book: Collapsible TOC entries not displaying correctly

Created on 30 Dec 2020  路  7Comments  路  Source: executablebooks/jupyter-book

Describe the bug

I just upgraded to jupyter-book v 0.9 but for some reason the collapsible TOC entries aren't displaying correctly.

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://melaniewalsh.github.io/Intro-Cultural-Analytics/Data-Collection/Data-Collection.html
  2. See the down arrow next to "Data Collection (Web Scraping, APIs)" not displaying correctly

Screen Shot 2020-12-30 at 10 24 26 AM

Here's the HTML for this page: https://github.com/melaniewalsh/Intro-Cultural-Analytics/blob/gh-pages/Data-Collection/Data-Collection.html#L248

  1. Go to https://melaniewalsh.github.io/Intro-Cultural-Analytics/
  2. See none of the collapsible TOC entries displaying

Screen Shot 2020-12-30 at 10 24 12 AM

Environment

  • Python Version [e.g. 3.7.1]: 3.7.6
  • Package versions or output of jupyter-book --version:
Jupyter Book: 0.9.1
MyST-NB: 0.10.1
Sphinx Book Theme: 0.0.39
MyST-Parser: 0.13.0
Jupyter-Cache: 0.4.1
NbClient: 0.4.0
  • Operating System: Mac OS
bug topisphinx-book-theme

All 7 comments

Yes the toc collapse icon elements appear malformed:
From https://sphinx-book-theme.readthedocs.io/en/latest/, a chevron looks like:

    <i class="fas fa-chevron-down">
    </i>

But on your site:

    <i attrs="{'class': ['fas', 'fa-chevron-down']}">
    </i>  

what is the sphinx version?

Sphinx version 3.4.0. Should I try to upgrade it?

actually also what is your version of beautifulsoup4, perhaps the new_tag implementation has changed here: https://github.com/executablebooks/sphinx-book-theme/blob/1ef9216b50d57d267b57dd96088577b2d342939d/sphinx_book_theme/__init__.py#L175-L176

beautifulsoup4 Version: 4.6.0

The sphinx-book-theme documentation was built with version 4.9.3, perhaps try that

yeh I believe it is due to this change in 4.6.1 https://bazaar.launchpad.net/~leonardr/beautifulsoup/bs4/view/head:/CHANGELOG#L258

Thank you!! Upgrading beautifulsoup4 fixed the issue and now the collapsible TOC entries are displaying properly.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nozebacle picture nozebacle  路  3Comments

choldgraf picture choldgraf  路  3Comments

choldgraf picture choldgraf  路  4Comments

rickwierenga picture rickwierenga  路  3Comments

bsamadi picture bsamadi  路  3Comments