pre-render script output (stdout) is ignored on Windows with Quarto v1.7.32 #13061
-
DescriptionHi everyone, I'm encountering an issue where the standard output of a pre-render script seems to be completely ignored by Quarto. My goal is to dynamically modify the book.chapters list before rendering, but the changes are not reflected in the final output.
Steps to ReproduceCreate a new directory with the 5 files listed above. Expected BehaviorThe rendered book in _book/index.html should have the title "SUCCESS: Output was Captured!" and the table of contents should include "Another Page". Actual BehaviorThe render completes successfully without any errors. However, the book title remains "Test Book" and "Another Page" is not included in the output. The stdout from the pre-render script is completely ignored. What I've Ruled OutThis is not a filter vs. pre-render script issue. The script is correctly specified under the pre-render key. Given that I'm using a pre-release version, is this a known issue or a potential regression? Any insights would be greatly appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
Could you share a Git repository instead of asking to create one out of many copy/paste which is error prone. |
Beta Was this translation helpful? Give feedback.
-
For reference: |
Beta Was this translation helpful? Give feedback.
-
@BunjiRo-creator what is your expectaction with standard output of pre-render script ? Our doc is here: https://quarto.org/docs/projects/scripts.html#pre-and-post-render and we don't say anything about So I wonder what you are expecting. From your example, it seems you are expecting the stdout to be written in Your pre-render script can modify the |
Beta Was this translation helpful? Give feedback.
-
Thank you all for the incredibly helpful discussion! Your insights were crucial in helping me understand the correct mechanism for pre-render scripts. Thank you all again for your time and help. This journey has been a fantastic learning experience about the inner workings of Quarto. |
Beta Was this translation helpful? Give feedback.
AFAIK project's
pre-render
script can be used to modify the_quarto.yml
as all the project configuration will be reloaded after pre-render script. This was added while working on Website Draft feature #8509 (5bfff40) in 1.5Documented at https://quarto.org/docs/projects/scripts.html#pre-and-post-render
Add…