JuliaDocs / Documenter.jl

A documentation generator for Julia.
https://documenter.juliadocs.org
MIT License
818 stars 478 forks source link

Subpages #701

Open fredrikekre opened 6 years ago

fredrikekre commented 6 years ago

It would be nice if Documenter's HTML renderer could support the following pattern:

page.md
   |------  subpage1.md
   |------  subpage2.md

where the subpages where displayed as H2-pages in the navigation bar.

After discussing with @mortenpi we have converged to the following suggestion:

Introduce a subpages function, very similar to hide which could be used in pages like:

pages = ["index.md", subpages("page.md", ["subpage1.md", "override heading" => "subpage2.md"])]

What would subpages do? The idea is that the only thing subpages does is that it changes the rendering of those pages in the navigation bar - from a H1 page to a H2 page.

Currently we always have the matching between a .md file and the .html file, and this will be preserved for subpages too, they will be their own .html pages.

Currently, by default, all html-pages are visible in the navigation bar (unless you use hide). The idea is that this should also be preserved, such that subpages are always visible in the navigation bar, even though they are on the H2 level.

We also think that it makes sense to leave the rendering of subpages alone (i.e. not change H1 to H2 for example). This hopefully makes implementation a bit simpler, since the only thing subpages will do is to change the navigation bar.

Some issues:

Did I miss something @mortenpi ?

mortenpi commented 6 years ago

There were also two three additional small things that came up. Although they are orthogonal to the subpages idea, I'll just write them down here:

LilithHafner commented 10 months ago

Bump, I would like this feature to help with https://github.com/JuliaLang/julia/issues/52684

kapple19 commented 9 months ago

Seconding this feature, All my collapse-ibles have a starting page labelled "Introduction" so there are "Introduction" pages everywhere. Need the conciseness of having the collapsible menu item also be a page to provide generic info about its sub-pages.