Replies: 1 comment 1 reply
-
tl;dr: This is probably going to be too hard to do in practice.
Lua filters change the Pandoc AST. Pandoc produces an HTML output file from the resulting AST. Quarto runs a few postprocessors on the resulting file. In the case of Shiny documents, this is a little more involved because of the split between server and UI contexts that is described here: https://quarto.org/docs/interactive/shiny/index.html But the main reason what you're trying to do is unlikely to work is this:
Quarto operates fairly strictly on a principle of "one .qmd file, one output file". There are exceptions to this, but they go in the opposite direction and are limited to book formats in postprocessing: after rendering each individual page, a book can be created by merging the different files into a single output .tex (or .epub, etc) file. |
Beta Was this translation helpful? Give feedback.
-
I'm building a survey platform leveraging Quarto shiny documents. It works just fine as is now, but I'm trying to understand the render process now to help me solve some issues I'm working on. We currently are using a lua filter to insert some js files, etc. before the ui renders to a static html page. But after the lua filter runs, we don't know what steps happen next. What does Quarto do with the rendered html page to then serve a shiny app? I just can't find any documentation on it. My understanding of the process is something like:
In case you're interested in why I want to know this, one thing I'm trying to do is see if it would be possible to split up that rendered static page into multiple static pages that I could then serve in the shiny server individually. The idea is to use a lua filter to split up the content into pages based on divs, save them as html pages, then replace the single static html page that would have been rendered with a sort of placeholder html page that the shiny server could then use to serve the individual pages into one-by-one. The whole goal of this is to keep the page content on the server side rather than client side. Right now with a single page design all of the content is available to the client in the single rendered html page - we're just using CSS and JS to hide and show it to appear like separate pages, but any user could just look at the source code and see everything. This is an issue for a survey platform that could contain things like completion codes at the end. I'm hopeful this approach might be solvable, but finding a solution depends on understanding what goes on in between the lua filter and a served shiny app.
Beta Was this translation helpful? Give feedback.
All reactions