mdBook icon indicating copy to clipboard operation
mdBook copied to clipboard

Ability to output into a single dom tree (html file)

Open est31 opened this issue 6 years ago • 7 comments

Continuation of #301 after that one was closed.

Right now mdbook creates multiple html files and you are forced to navigate through them via controls. Right now books often have entire pages full of one headline, one sentence and otherwise whitespace (beyond index, search bar, etc). IMO this makes quickly skimming books unneccessarily hard. It'd be therefore prefferable to have the entire book condensed into one single html file. This pattern of serving both combined single pages as well as fractured snippets is nothing new, e.g. the GNU Make manual is offered in single html and multiple file modes as well.

est31 avatar Jul 23 '19 13:07 est31

This seems like a duplicate of #982, while #301 was meant to be aboout the input being a single file.

heyakyra avatar Jul 29 '19 11:07 heyakyra

thanks @heyakyra, but I told them to create this issue because it is different from SPA

Dylan-DPC-zz avatar Jul 29 '19 11:07 Dylan-DPC-zz

Lol, it's a bit confusing.

@heyakyra if I read your request correctly, what you want is to create a JS application that behaves to the user like the current thing except that more of it is done via JS. Is that right?

What I want is that mdbook in addition to creating multiple small files also creates a file that is a combination of all the small files into one big scrollable html file. Without any need for JS or fetch during the loading process (Chrome sadly blocks fetch on file://).

est31 avatar Jul 29 '19 12:07 est31

@est31 That's right, and I see now that it is different from what I suggest, but it is also still different from #301. So I was just suggesting to @Dylan-DPC who said in the other report:

Closing this since we can carry on the discussion on the new issue. Thanks

but I don't think it should be closed since it is different from mine and from this one.

heyakyra avatar Jul 29 '19 13:07 heyakyra

@heyakyra oh you are right, now I realize. This issue is different from #301. I originally got confused because I reported the single page question on another repo and it got closed as dupe of #301: https://github.com/rust-lang-nursery/reference/issues/68

est31 avatar Jul 29 '19 14:07 est31

@heyakyra yes. I mainly closed it because it is an old issue and I didn't want to ping people who may no longer be concerned by that issue any more. Hence suggested to create a new issue :)

Dylan-DPC-zz avatar Jul 29 '19 14:07 Dylan-DPC-zz

What I want is that mdbook in addition to creating multiple small files also creates a file that is a combination of all the small files into one big scrollable html file. Without any need for JS or fetch during the loading process (Chrome sadly blocks fetch on file://).

I went through the thread across all the different issues and this is exactly what I think would work for my use case as well. I need a single HTML page with editable playpens so I am currently manually overriding the theme to hide the sidebar and other control buttons.

depombo avatar May 17 '20 08:05 depombo