-
Notifications
You must be signed in to change notification settings - Fork 7
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
[RFC] Options to have the full content in one page #37
Comments
I like this idea, as an option. The problem is how it should be done, in the forum post, two people want to read the same documentation in these different formats. Should you be able to generate either a multi-page or a single-page. Or could they be combined so the TOC automatically adds a SinglePage entry at the top/bottom which leads to the single page (which needs its own TOC of course). An alternative would be to add an option to the TOC DSL so that we add a way to specify which pages to include in a single-page. For example something like this: concater("index", "data_viz/plotting", "basics/basic_units") And then have an option for including every file in the single page. Just some random thought. |
IMHO, It should be an exclusive or. I'm not necessarily against the idea but doing partial concatenation of multiple source file is going to generate a lot of corner case and increase the complexityby a tenfold for little added value. So I suggest we start simple, solve the base (most common problem) which is that people want single-page, searchable doc, then we'll see if expanding from there is worth it. |
I disagree simply because it doesn't solve the problem discussed there. In this case, it would be up to the writer to decide which layout to use, not the users who are the ones who would have the most differing preferences. I'm not saying we have to implement the both-case from the beginning, simply that I think it should be an option in the future when we have figured out how to do it.
Ok agreed, no fine-grained control. An all-or-nothing approach instead.
Agreed, simple to begin with and then we'll see what we end up with and take it from there 😄 |
@pietroppeter Any idea on how we can do this ? |
hi, back from vacation today, need to catch up on lots of stuff, but I will review this and give my take in the next few days! |
in the meantime, from a quick search I was able to find the relevant issue from mdbook (currently still open): rust-lang/mdBook#988 |
I think the easieast way to implement such a functionality currently would be to add a command to build the single page book from the multiple page book after the regular book has been generated. An option
this would be the base to get the single page behaviour. Additional stuff (remove the multi page html if you do not want it, add cross links from single page to multi page, ...) could be added later. |
I like this idea 👍 One thing I've been thinking about, is how to decide what to put in the |
I guess if you want to have the single page working you need to define all "options" at book level. We could probably add a context at book level that would be used to generate the single page document. (btw |
Sounds like a good compromise 👍 sounds like something you would like to do either way. Sort of the same as nbInit before but better I hadn't even noticed latex was missing :o But $$ is indeed just rendered as text 🙈 |
it appears someone has implemented the single page functionality in mdbook rust-lang/mdBook#982 (in their own fork, not yet an open PR) |
For that we need to :
<main>
section of generated html page into one fileOr alternatively, this could be a new theme entirely; whichever is easier.
For reference to https://forum.nim-lang.org/t/8249.
The text was updated successfully, but these errors were encountered: