docsy icon indicating copy to clipboard operation
docsy copied to clipboard

sidebar_menu_truncate needs to be documented

Open gary-vertica opened this issue 3 years ago • 5 comments

I just spent a day tearing my hair out trying to determine why some pages were being excluded from the section menu of our documentation. While looking into another issue I'm having with Docsy, I stumbled across a mention of the sidebar_menu_truncate param in PR #475. Sure enough, when I set this parameter to higher than the default value of 50, the missing pages appeared in the section menu.

I can't find any reference to this parameter in the distributed config.toml file, nor is it mentioned in the documentation. I can't understand why this parameter exists in the first place. It isn't intuitive to arbitrarily start excluding pages of documentation from the primary navigation menu when there are more than 50 pages in a section. But at the very least it needs to be either in the default config.toml or mentioned in the documentation. Preferably both.

gary-vertica avatar Apr 18 '22 16:04 gary-vertica

Hi, I'm the contributor of PR #475 (but with a new user name). As the PR is quiet long ago, I can't remember the details, but before my PR it was hardcoded in the sidebar-tree.html, that only only for the first 50 pages links got generated.

In my PR I've made some restructure of the sidebar generation and changed the before hardcoded limit of 50 pages to the undocumented option sidebar_menu_truncate, as this limit also wasn't documented before my PR.

@LisaFC I would say, https://www.docsy.dev/docs/adding-content/navigation/#section-menu-options would be the right place to describe this parameter. What's your opinion?

raum51 avatar Apr 18 '22 20:04 raum51

Yes, that's exactly the right place! It's now long enough that we could possibly add some subheadings/bullets, but I can make those suggestions/updates in a PR if you send it to me for review.

LisaFC avatar Apr 22 '22 14:04 LisaFC

Seems there is an open PR for that: https://github.com/google/docsy/pull/1334 Also, do you think that we could increase this default to ~1-200? I've just ran into this issue again, and took some time to remember and find the root cause :)

fekete-robert avatar Feb 22 '23 14:02 fekete-robert

See also https://github.com/google/docsy/pull/1438 to show a warning during build if the toc is truncated

fekete-robert avatar Feb 23 '23 15:02 fekete-robert

Happy i found this issue since i ran into this problem myself recently, "sidebar_menu_truncate" should get a mention in the documentation.

keawest avatar Jan 16 '24 08:01 keawest