A single model summary can run to forty lines, and a document with a dozen of them becomes a document about its own output. Quarto folds source code with code-fold, but the output beneath it stays where it is.
collapse-output does the same for the output. A cell marked output-fold: true has its results wrapped in a <details> element, so the reader opens the ones they care about.
Installation
quarto add mcanouil/quarto-collapse-output@1.5.2
This will install the extension under the _extensions subdirectory. If you are using version control, you will want to check in this directory.
See the Reference for every option, and the Examples for each of them rendered.
Note
The filter acts on the cell and cell-output elements Quarto emits, not on any one engine. Examples runs Python through Jupyter and Examples in R runs R through knitr; neither is configured differently.
Where it works
HTML formats. <details> is an HTML element, so in every other format the output is left exactly as it was, unfolded and complete.