-
DescriptionHow are folks passing data generated from an expensive step that should only happen once but is used my multiple qmds in your website? Example: So if in my data <- make_expensive_api_call()
write_rds(data, "data.rds") And then in various
And then in my post-render I have a clean script that deletes Ignoring my choice of |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
I don't think there is another approach or use |
Beta Was this translation helpful? Give feedback.
There's no persistence from the execution of one .qmd to the next, aside from artifacts your code might create as a sideeffect (in the filesystem, databases, web services, git repos, etc). So you will need, somewhere in each of your .qmd files, to actually load them. If you're concerned about code repetition, you can consider using an include shortcode that contains the executable code you want to run, so that the repetition is condensed into a single line.