paradox icon indicating copy to clipboard operation
paradox copied to clipboard

Sub-pages that do not appear in global navigation

Open Sciss opened this issue 6 years ago • 5 comments

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 avatar Jun 06 '18 17:06 Sciss

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.

Sciss avatar Jun 06 '18 17:06 Sciss

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.

2m avatar Jun 07 '18 10:06 2m

@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?

Sciss avatar Jun 07 '18 21:06 Sciss

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.

2m avatar Jun 08 '18 06:06 2m

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

bilalesi avatar May 10 '23 19:05 bilalesi