Documenter.jl: HTML contents not sorted correctly

Created on 22 Aug 2016  路  5Comments  路  Source: JuliaDocs/Documenter.jl

I just tried out the HTML renderer on 0.3.0 and I found that the @contents blocks are not sorted as I wrote them, e.g.

```@contents Pages = [ "algorithms.md", "graph-types.md", "graphs-builtin.md", "interface.md", ] Depth = 1 ```

will show the links in the order provided with mkdocs, but it will show "graph-types", "graphs-builtin", "interface", "algorithms" with the HTML renderer.

BTW Is there any way to only show the contents from depth 2 for a page, i.e. excluding the page title as redundant?

Bug

Most helpful comment

Yes, a minimum depth sounds reasonable. Perhaps using a UnitRange instead of an Int for the Depth value. So something like

```@contents Pages = [ "algorithms.md", "graph-types.md", "graphs-builtin.md", "interface.md", ] Depth = 2:4 ```

to display only levels 2 to 4, while internally Depth = N is rewritten as Depth = 1:N.

All 5 comments

Thanks for the report, I was able to reproduce it on Documenter's docs as well.

I don't think it's possible to set a minimum depth at the moment. Seems like a reasonable request though. @MichaelHatherly?

What would the use case for that be by the way.. contents of the same page?

Yes, a minimum depth sounds reasonable. Perhaps using a UnitRange instead of an Int for the Depth value. So something like

```@contents Pages = [ "algorithms.md", "graph-types.md", "graphs-builtin.md", "interface.md", ] Depth = 2:4 ```

to display only levels 2 to 4, while internally Depth = N is rewritten as Depth = 1:N.

@MichaelHatherly: I believe that the ordering issue arises because the sort in populate! is sensitive to the file extension. Any thoughts? Perhaps we should keep page as the .source not the .build?

Perhaps we should keep page as the .source not the .build?

Yes, that sounds fine to me.

What would the use case for that be by the way.. contents of the same page?

Yes. It came up because I thought it'd be nice to show the page contents after the introductory paragraph in this page.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jonathan-laurent picture jonathan-laurent  路  3Comments

nalimilan picture nalimilan  路  4Comments

SimonEnsemble picture SimonEnsemble  路  3Comments

Datseris picture Datseris  路  4Comments

briochemc picture briochemc  路  3Comments