Skip to content
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

[Proposal] Nested books and book references #1666

Open
aiden-leong opened this issue Oct 9, 2021 · 0 comments
Open

[Proposal] Nested books and book references #1666

aiden-leong opened this issue Oct 9, 2021 · 0 comments

Comments

@aiden-leong
Copy link

aiden-leong commented Oct 9, 2021

Preface

This idea comes from Makefile. I use mdBook as a blog system, so the main book is called blog. At the same time I'm writing several independent books or documents on different topics. If I put them in a single book, the user experience won't be as good as we expect.

Proposal

SUMMARY.md

.
├── book1
│   └── SUMMARY.md
├── book2
│   └── SUMMARY.md
├── book3
│   └── SUMMARY.md
└── SUMMARY.md

We may have multiple nested SUMMARY.md. In the above case, we will generate 4 books. localhost:3000, localhost:3000/book1, localhost:3000/book2 and localhost:3000/book3. If there's no cross reference, they are just 4 books. It doesn't matter if the SUMMARY.md in the top folder uses files in sub directories.

Cross Reference

<!-- # main book‘'s SUMMARY.md -->
- [Book 1](./book1)
  • If there are cross references in SUMMARY.md, generate an entry for another book.
  • If the cross reference is in context, it's just a normal url, nothing special needed.

Further

We may have nested book.toml as well, but that's another topic. I don't want to cover it in this proposal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant