getzola / book

Gitbook theme for Zola
MIT License
57 stars 19 forks source link

Multiple books on the same site #13

Open data-coder opened 4 years ago

data-coder commented 4 years ago

Hi,

I have a site with tons of books and want to move it to Zola.

Is there a way to have multiple books, each one with their own chapters?

Example:

content
 ├── programming
 │   ├── index.md
 │   ├── compilers.md
 │   └── programming-languages.md
 │           ├── index.md
 │           ├── rust
 │           │      ├── index.md
 │           │      └── cargo.md
 │           ├── python
 │                  └── index.md
 ├── mathematics
 │   ├── index.md
 │   └── algebra.md
 └── philosophy
     └── index.md

For example, if I’m visiting example.com/programming, on the sidebar, I’d like to see:

On a side note: “books” and “chapters” are just metaphors. I have nested “books” and in each one, on the sidebar, I see the parent, siblings, and children.

Keats commented 4 years ago

You probably want to use this template as a base and just override the templates to fit your own need. So rather than adding them in themes, just add the templates in templates and hack away.