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

Single-Page Application (SPA) Mode #982

Open
heyakyra opened this issue Jul 16, 2019 · 4 comments
Open

Single-Page Application (SPA) Mode #982

heyakyra opened this issue Jul 16, 2019 · 4 comments

Comments

@heyakyra
Copy link

It would be nice to be able to render the entire book into a SPA that doesn't load a new html file for each page and instead uses JavaScript to switch pages.

@WofWca
Copy link
Contributor

WofWca commented Jul 28, 2019

Related (dup?) #546

@heyakyra
Copy link
Author

Hm, I suppose #546 is one possible way to achieve this. Another would be a virtual DOM similar to what Elm or React would provide.

@doregex
Copy link

doregex commented Aug 11, 2022

Hi, I have implemented a new flag that does something similar in this fork doregex/mdBook. It can be added to the book.toml like:

[output.html]
single-page = true

By enabling it the pages are rendered inside the index.html, the search has also been modified to output results that are clickable using hashes.
The feature is just an add-on that doesn't affect the behaviour. I would like to open a PR to merge this function.

@segeljakt
Copy link

Any chance this could be turned into a custom renderer backend?

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

4 participants