Mdbook - adding a custom link

[Is there a mdbook-specific forum I should be using?]

We have a small web server that hosts a few different mdbooks. The web server automatically scans and indexes all the mdbooks under a specified directory and lists them on an index page.

A tester remarked that when someone clicks on an mdbook title, they end up in the mdbook as expected but then there's no way to "escape" the book to get back to the index, except using the brower's back button, using a bookmark or explicitly entering the index page's address in the url field.

I would like to add a "Return to library" link to each mdbook. I tried to add an entry to SUMMARY.md which links to /, but I assumed mdbook wouldn't accept this, and indeed it doesn't. The docs mention templating support, and also notes that one can write a custom javascript to generate the table of content. It's not immediately clear to me which method is the simplest to replicate over a number of mdbooks.

Any tips on how to accomplish this?

Just to be clear, all I want to do is make every mdbook include some kind of link which brings the user back to / (the index page which lists all mdbooks). It doesn't matter if it's an entry in the TOC pane, or if it's a link in the form of an icon at the top. The only important thing is that it is easily accessible on every page within the mdbook, that it's easy to implement (it's going into every mdbook), and that it doesn't introduce a high maintenance burden (for future mdbook updates).

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.