-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Support Duplicate Entries in SUMMARY.md #2634
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
Comments
Thanks for reporting and sorry for breaking your book. Is it a public book? Is it already listed on public mdbooks? Maybe we need to be able to create a file the states where its source can be found, where to copy its content from. # Summary
[Introduction](README.md)
[Quick Start Tutorial](./QuickStart.md)
---
- [Guides](./GettingStarted/README.md)
- [Quick Start](./GettingStarted/QuickStart.md)
- [Other Guide](./GettingStarted/AnotherGuide.md)
- [Fundamentals](./Fundamentals/README.md) The
or better yet
(For this we need to introduce the front-matter that was also mentioned here #2142 and that I very much would like to implement) Then the resulting site would have the same content twice. Both in
The copy should be automatically excluded from the indexing. |
It is: https://github.com/ProjectLibertyLabs/gateway/tree/main/docs (just updated to remove the double link for now)
Either of those versions would work for all of our needs I can think of. Another option might be to allow for other links in the SUMMARY. I know there are some issues around that sort of thing already such as #2573 P.S. Thanks so much for helping build such a great tool! |
@wilwade You might want to go back to use the previous version of Nice book, I've added it to the list of public sites. I think the format of |
@szabgab Thanks that all makes sense to me! Thanks for keeping this in mind and feel free to post ideas if you want any feedback. We're considering about a bit of release code or part of the custom theme that duplicates the page or such still. Fortunately, it is isn't a blocking issue. I've done some fairly heavy theme modifications in on a related mdbook so, fairly comfortable with hacking something in there if we need to. https://docs.frequency.xyz/ (GitHub: https://github.com/frequency-chain/docs) |
I need duplicate entries in my use caseI treat
This will cause a error, since every list item in So I add dummy links:
|
@smilingpoplar Thanks for your input. Do you have any content in the Finally, is the source of your book public? |
I use mdbook to organize my personal knowledge base, so it's ok to have some "broken" link. |
@smilingpoplar ok, so for the short run you can either stay with the previous version of mdbook that still allowed duplicate entries or you can create a separate filename for each chapter ( On the longer run we might need to offer a way where we can have chapter heads without associated files. |
@smilingpoplar have you tried using draft chapters?: - [chapter 1]() They might provide what you intend to achieve. |
Oh, it works. Thanks. |
We have duplicate entries in the System76 Tech Docs mdbook as well: https://tech-docs.system76.com/ We have the README.md "home page" that links to all of our chapters. However, those chapters are split into two categories (current models and previous models). We want that grouping to appear in the sidebar, so currently, we're got two links (for those groups) both pointing to README.md. From what I understand, we'll either need to use draft chapters (making the section headers in the sidebar non-clickable), or make a structural change splitting out our current and previous models into different pages so they can be linked as different files? Edit: Just to note, I understand the concern with the next/previous button behavior-- when just navigating through with the next button, we cycle through all of our current models and never get to the previous models, which I would consider a bug. However, people usually come to this particular docs website to access a specific chapter, not to browse the entire book/website in a linear fashion. |
@jacobgkau I am sorry for the changes causing you trouble. There are a number of fixes I can think of:
The ideal solution would be probably what was suggested above with the front-matter. @ehuss it is your call, but I would not just revert that change: I'd either improve the error message to include an explanation about the problem duplicate files cause with a link to this issue or I'd change it to a warning with a link to this issue. e.g.
It would be also nice if you commented on the solution I suggested. It could be implemented in a few hours. |
I am having the same problem with a private deployment and using "draft chapters" as described above works for me as a temporary solution. |
So v0.4.48 just came out with #2612 and that fixed one thing and broke another.
#2612 correctly had noted that if you have a duplicate entry in
SUMMARY.md
that the prev/next links are broken.However, it feels like there should still be a way to have multiple entries still. Here is how we were using it:
In the best scenario, the first link
Quick Start Tutorial
should just be a link toGuides/Quick Start
and the prev/next buttons are for that page. Previously, the prev/next buttons were just for the first entry, which worked ok because both pages were considered active, and unlike in #2612 because it was nested and away from the other, it wasn't as big of a deal.Things tried:
Any other ideas on how to achieve the double pages in situations like this where it is desired?
The text was updated successfully, but these errors were encountered: