Support the compilation to additional output-formats for subsections of a (website) project/ white- & black-listing specific render-targets per format. #8455
Replies: 2 comments
-
Background:
The thesis is set in the general area of multivariate data-analysis & computations are expected to take a somewhat significant amount of time (even after considering common countermeasures). Time/Performance-Loss due to unwanted renders: Time/Performance-Loss due to format-specific computations & limitations to codechunk-caching across formats: vsc-maintenance: And while getting rid of an unintentionally introduced file is certainly doable in git, this just piles up on the amount of corrective-maintenance one would have to do in order to keep their repo clean. If users could "whitelist" or "blacklist" output-formats for specific directories, this risk would be significantly reduced (and as a nice side-effect, we wouldn't need to rely on This comment can be marked off-topic; it's an excerpt of the original state of the discussion which I cut out for clarity. |
Beta Was this translation helpful? Give feedback.
-
I wonder if this is a (reverse?) variant of #7101 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
As discussed in #8394 I will be outlining the reasoning for rendering subsections of a project to additional formats/excluding subsections of a project from specific formats1.
In the context of this FR, the project-type is set to
website
. I am not building a book-project as there is significant overlap between both submission-documents. As a result, I would need to duplicate a lot of code and information across both projects - which just screams for issues.I do think there might be some merit in implementing this for books as well, but I haven't given it enough thoughts so far. I will henceforth refer to website-projects unless explicitly stated otherwise.
For some background on why I am opening this, see this comment
The actual FR:
I don't claim that this is the best-end-of-discussion solution to this; I am certain that I lack some understanding of the greater picture.
In some (website) projects, you may require different sets of formats for different files. You might want to supply certain documents in
html
andpdf
, but do not require all documents in all defined formats. Depending on the architecture - even with tools likefreeze
- rendering to multiple formats can introduce significant overhead for every file you compile to a format you don't need it in. In the outside-facing website/outputs one can disable linking to other formats for specific formats, yet they are still rendered.I would suggest a means to completely block a format being rendered-to on a per-file level. Below is a (sensible to me) approach for implementing the user-facing configuration side of things.
The
root/_quarto.yml
-file allows setting render targets via theproject.render
-key that controls which documents are and are not rendered. It's responsible for most of the heavy lifting for configuring any project, so it seems a suitable place to configure this as well.In principle, the
format
-key could be expanded by a sub-key à laformat.<format>.render
, which would essentially operate the same way:I think Metadata-merging would take normal precedence, meaning directory- & document-level
format.render
-values would either trump, or get merged to the project-definition. Ifroot/documentation/methods/formats.yaml
containsThen after merging, we get in total:
Upon execution, the file
root/documentation/methods/pls.qmd
should be rendered tohtml
(blanket whitelist in global_quarto.yml
) andpdf
(local whitelist in directory). If configured, the pdf-file should be linked-to on the documents' html-representation. Accordingly, documents which are not rendered to multiple formats should not contain the links to said formats if they are not generated for that file.I believe this solution is reasonably simple on the UI-level, but I don't pretend to understand the scope of the underlying codebase itself.
Thank you for considering this FR.
Sincerely,
~Gw
P.S.: I am happy to elaborate if I failed to bring my points across or missed something that is not clear.
Footnotes
This is kind of the same, just inversed. ↩
Beta Was this translation helpful? Give feedback.
All reactions