Skip to content

[Proposal] Nested books and book references #1666

Open
@aiden-leong

Description

@aiden-leong

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions