Html Export Facilities, part 1#4582
Conversation
Adds menu items for "regular", zipped, and inline output. Currently only displays inline output with *no* URL massaging ( all relative path references are still relative ) Displays, not downloads
There was a problem hiding this comment.
The general idea here is OK to me. Personally, I would say the .zip is the most useful, followed by the "slim".
My main feedback is that this added helper simulateRenderPage() is nearly identical to the existing page render function, so there is a lot of duplication and now two places we need to maintain if the rendering sequence changes.
My preferred approach would actually be to just grab the already-generated HTML straight from the DOM, similar to what we do for generating the PDF. Is that possible to reduce the duplication?
Based on the unclear requests and general non-answers to follow-up questions, these three modes all seem to be equally requested. "Slim" is the most obvious as it should be handy for embedding or passing to an external process, like DocRaptor, similar to the way the old print endpoint did. I can see an argument for dropping inline if we insist that the zipfile adds all remote files to the archive ( probably everyone's assumption? )
I don't know that that is a bad idea but in order to work in all the scenarios I am targeting it would mean taking the HTML and posting it to the endpoint. That could be a bit.. large. At the moment, I don't recall what all I trimmed out/adapted - maybe we could consolidate the duplication even if it means a slightly more challenging to read function/functions. |
This duplicates the share endpoint. It uses the Share Page template with a boolean for share vs embed to toggle displaying the navbar and toolbar. Added a showToolbar property to brewRender to toggle... showing the toolbar.
Still requires path manipulation. Stubs the same for Zipfiles.
Description
This is the first part of a proposed feature extension that allows for downloading the Brew Render as HTML.
Downloads will be available as
This also adds the /embed endpoint, which is a modified version of share without the tool and navbar. This is for external embedding or services like DocRaptor to ingest.
Currently only downloads the HTML from the brewRender window with no URL massaging ( all relative path references are still relative ) and a default filename.
Related Issues or Discussions
To Do