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

[jupiter-book] Missing Table of Contents #331

Open
Mrsenior12 opened this issue Feb 27, 2024 · 2 comments
Open

[jupiter-book] Missing Table of Contents #331

Mrsenior12 opened this issue Feb 27, 2024 · 2 comments

Comments

@Mrsenior12
Copy link

Mrsenior12 commented Feb 27, 2024

I'm using this theme inside jupyter-book to generate documentation. Unfortunately in every file excluding "root" file Table of Contents is missing.

In documentation I could find anything related to that issue :(

Section with theme configuration in _config.yml looks like that:

sphinx:
  config:
    html_theme: "sphinx_immaterial"
    html_theme_options: {
    "globaltoc_collapse": True,
    "edit_uri": "blob/develop/docs",
    "features": [
      "navigation.expand",
      "navigation.selection",
      "navigation.top",
      "search.share",
      "toc.follow",
      "toc.sticky",
    ],
    "palette": [
        {
            "media": "(prefers-color-scheme: light)",
            "scheme": "default",
            "toggle": {
                "icon": "material/lightbulb-outline",
                "name": "Switch to dark mode",
            }
        },
        {
            "media": "(prefers-color-scheme: dark)",
            "scheme": "slate",
            "toggle": {
                "icon": "material/lightbulb",
                "name": "Switch to light mode",
            }
        },
    ],
  }
  extra_extensions:
  - sphinx_inline_tabs
  - sphinx_immaterial
@2bndy5
Copy link
Collaborator

2bndy5 commented Feb 27, 2024

I never used jupiter-book before. Providing a config is not very helpful. Weirder that it is an oddly written YAML config. We need steps to reproduce. Can you attach a zip of a sample project that re-produces the problem?

@2bndy5 2bndy5 changed the title Missing Table of Contents [jupiter-book] Missing Table of Contents Feb 27, 2024
@2bndy5
Copy link
Collaborator

2bndy5 commented Jul 5, 2024

jupyter-book seems to support a lot of customizable options (including an optional third-party extension called sphinx-multitoc-numbering which is still in beta). In fact, jupyter-book is more like a wrapper around Sphinx (see their docs' explanation).

This theme's HTML templates were inherited from the mkdocs-material theme. So this theme deviates away from Sphinx' conventional ToC structure to work like a ToC generated by mkdocs (plus a build-time performance boost compared to sphinx-native ToC generation).

I'm not sure if we can support the jupyter-book project. Doing so might require involving devs from that project because there is so much going on under the hood. I would recommend using a theme by the executablebooks org as they are the github org also maintaining the jupyter-book project (among many other popular Sphinx extensions like MyST-parser).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants