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

Collapse level in menu not working (as expected) #2110

Closed
tamasgal opened this issue Apr 20, 2023 · 3 comments
Closed

Collapse level in menu not working (as expected) #2110

tamasgal opened this issue Apr 20, 2023 · 3 comments

Comments

@tamasgal
Copy link

tamasgal commented Apr 20, 2023

I am having difficulties with the main menu, not being able to expand them all by default. I thought setting the collapselevel parameter of Documenter.HTML to a higher value would do it but it seems to have no effect. (here is a live example https://common.pages.km3net.de/KM3io.jl/dev/)

Only the currently selected menu is expanded, everything else is collapsed. Here is a screenshot where "Examples" have been clicked:

Screenshot 2023-04-20 at 14 03 00

This is my make.jl:

makedocs(;
    modules = [KM3io],
    sitename = "KM3io.jl",
    authors = "Tamas Gal",
    format = Documenter.HTML(;
        assets = ["assets/extra_styles.js"],
        collapselevel = 4,
        warn_outdated = true,
    ),
    pages = [
        "Home" => "index.md",
        "Examples" => "examples.md",
        "API" => "api.md"
    ],
    repo = "https://git.km3net.de/common/KM3io.jl/blob/{commit}{path}#L{line}",
)

and index.md, examples.md and api.md contain #, ## and ### headings.

Any idea what's wrong? I compared my configuration with a few other ones but I can't spot my mistake.

@mortenpi
Copy link
Member

Yes, that's intended. There is a distinction between page hierarchy and in-page headings. collapselevel is only about the former.

You want all in-page headings to always be expanded?

@tamasgal
Copy link
Author

Ah OK thanks. Yes, I'd like to expand them all. I guess I have to rearrange the pages structure then?

@mortenpi
Copy link
Member

Yeah, if you want stuff always to be listed in the sidebar, you'd have to turn the in-page headings into separate pages.

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

No branches or pull requests

2 participants