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

HTML build fails when subtree starts with subtree #89

Open
n8willis opened this issue Feb 26, 2023 · 1 comment
Open

HTML build fails when subtree starts with subtree #89

n8willis opened this issue Feb 26, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@n8willis
Copy link

n8willis commented Feb 26, 2023

Describe the bug

context
When the first entry in a subtree is another subtree, the make html build fails, with etoc complaining that the entry is not a file, glob, or url.

For example:

root: README
options:
  maxdepth: 2
subtrees:
- maxdepth: 1
  entries:
  - file: index
    title: Overview
- maxdepth: 2
  caption: Script shaping
  entries:
  - subtrees:
    - numbered: 3
      maxdepth: 2
      caption: Indic
      entries:
      - file: opentype-shaping-indic-general
        title: General model

(that's real-world start-of-external-TOC from this project, if anyone's curious.)

expectation
I expected the TOC to be built as defined.

There's certainly no reason that subtrees can't be nested within other subtrees. In fact, the extension docs show that. This bug is just (or appears to be just) when a subtree is the first item in the entries. Notably,

bug

Extension error:
[etoc] entry does not contain one of {'glob', 'file', 'url'} @ '/subtrees/1/entries/0'
make: *** [Makefile:20: html] Error 2

If I'm reading the single-quoted output part there correctly, it's crashing out at the second subtree declaration, on line 12 in the example.

problem
This is a problem because the structure of the information dictates where we need subtrees, and nested subtrees can not only happen, but may be vital to organizing the docs correctly.

Reproduce the bug

As quoted in the example above.

List your environment

Sphinx 5.3.0, sphinx-external-toc 0.3.1.

@n8willis n8willis added the bug Something isn't working label Feb 26, 2023
@welcome
Copy link

welcome bot commented Feb 26, 2023

Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗

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! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant