-
Notifications
You must be signed in to change notification settings - Fork 899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Page TOC not showing up #853
Comments
If I remember correctly without a computer to check, the Repository links have to be enabled or the content of the page must have enough headlines, otherwise there is no right sidebar built. So try to set more headlines in your content markdown file or/and check if the repository links are enabled. |
That is very weird. Agree with @narrenfrei, can you check that you're using regular Markdown/HTML headers for your section titles, as that's what the right nav is built from. |
It's weird indeed, and really breaking a bunch of our pages, but it's coded into Docsy's TOC generation... If the generated HTML for that TOC is less than 200 characters, the TOC doesn't get output into the page. What is the reasoning behind the 200-character minimum? (@narrenfrei and @LisaFC tagging you since this is old, but affecting my team as we try to deploy Docsy on a large docs site...) https://github.com/google/docsy/blob/main/layouts/partials/toc.html#L3 |
Should have added: I've fixed this locally by overriding the |
Huh, that's extremely strange, and thanks for spotting it - I didn't create that TOC file and I'd never noticed the character minimum, it does indeed seem quite high given that people might have very short header titles. Would you create a PR to reduce the minimum to 100 in the theme version, please? |
I've restructured the partial toc.html a while ago (with my old name @narrenfrei) and I also wondered about this limit but let it as it was before my updates. In my own productive Docsy, I have disabled this limit by overwrite the toc.html. I would support to remove this limit or better make it configurable by parameter (with default value 200). |
@raum51 I wonder what the logic behind the character count is, rather than a word count (or better, heading count)? At Yugabyte, we're doing a variety of overrides with the TOC, but I'll ask the developer who's working on our site to take a look at this issue. |
Let me link my Idea here it is not similar, but related: #1093 IMHO it should be possible that the reader can navigate to the contents of the righthand sidebar even on a small screen like an iPhone. I am happy to hear your thoughts on that discussion item. I am currently experimenting with that Idea. |
What do we think of @samiahmedsiddiqui's solution in #1110 (thanks for that!)? We'd need to document it as well obviously. |
Related:
Some thoughts on the subject:
Thoughts? |
|
Agreed! The only situation I can think of where you might not want to display the TOC would be if you had a page with only one heading or something and it looked a bit odd - but in that case we have a parameter to switch off the TOC, don't we? |
Right it sometimes looks odd, but I've seen cases (where the pages are particularly long), where it makes sense to keep the solo TOC entry.
Yes, the |
I'm trying to use docsy for my project's documentation, but the right-hand side menu is not appearing (the one with the table of contents and "Edit this page" etc...). This looks very ugly and I don't know why it's not working.
The text was updated successfully, but these errors were encountered: