lightbend / paradox

Markdown documentation
https://github.com/lightbend/paradox/blob/main/docs/src/main/paradox/index.md
Apache License 2.0
248 stars 76 forks source link

Sub-pages that do not appear in global navigation #200

Open Sciss opened 6 years ago

Sciss commented 6 years ago

If I add pages that are not contained in any @@@ index blocks, they lack the standard navigation bar. I need to add pages that do not appear in the navigation themselves. (example: imprint in the footer, project sub-pages that should not appear in an expanded tree view).

How do I accomplish this? Thank you!

Sciss commented 6 years ago

To clarify, what I would like is to be able to do this:

project.md

@@@ index

- [sub-page](Sub Page)  <!-- don't print this in the left navigation bar -->

@@@

Alternatively, if there is a way to specify like depth=0 but for the index not a page TOC itself.

2m commented 6 years ago

I think one of the possible solutions for smaller snippets would be to have a place holder in the theme that you are using and then put the content to the _template directory as a st (string template) file. That might work well for smaller contents like contents in footer. We do it like this for logo in the header section in the Alpakka project.

But for larger pages, I do not see a compelling use-case of having them not reachable from the index.

Sciss commented 6 years ago

@2m they could be readable from the index, but it's unfortunate that the index seems always expanded. is there an option to say do not expand the index tree (the navigation left hand side tree) by default?

2m commented 6 years ago

These sbt settings can be used to control the depth (or the auto expansion) of the navigation tree:

https://github.com/lightbend/paradox/blob/bc93790959d951d94a83437ab32110c90b1fce2a/plugin/src/main/scala/com/lightbend/paradox/sbt/ParadoxKeys.scala#L27-L29

I see that they are not mentioned in the docs. Sorry for making them hard to find.

bilalesi commented 1 year ago

is there any solution for this issue, i also have some pages that i want to make it reachable by reference by not showing in the navigation bar