-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Raise error if embed-resources: true
#12
Comments
I haven't taken a look at how the output, but there's a lot of dynamically loaded stuff (wasm files, wheels, and others), and unfortunately, I don't think it will be possible to embed all those resources into the page -- I don't even know how quarto would be able to know about them, since some of the files (like wheels) are only known about at run time. |
No worries. Could it be possible to raise an error if that's being set? |
I think that probably can be done, but I'll have do a bit of investigation to figure out how. |
That'd be great if so, otherwise this issue also can act as a quick find for folks that try the same thing 😅 |
I recommend writing this as a prerequisite in the Readme file |
Any updates on this? I'm trying to do the exact same thing, but as @wch said above , it sounds like it's not possible to create a completely self-contained HTML file that contains a shinylive codeblock? The idea of raising an error sounds good, then it at least gives the user some more information that it won't work. |
embed-resources: true
and shinyliveembed-resources: true
It turns out that shinylive's Lua filter won't have access to the In the mean time, I've come up with a hacky but workable solution. When shinylive is used with So we can add some warning code to the top of the code chunk that only shows up when shinylive fails to load. The top of the code chunk always contains the chunk options, so we need to use the same syntax:
Hopefully this gives enough information to the person with the broken output to figure out what's going wrong. |
Hi all!
Love the project :)
Hit a fun snag when I was getting a recent blog up and going where if
embed-resources:true
is set in my_quarto.yml
, shinylive just won't render!Minimal repr:
YAML:
somepage.qmd
:Result:
![image](https://private-user-images.githubusercontent.com/7831895/243507955-25fa9e44-bd71-41c8-a916-8aee0c891933.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxODMxMzEsIm5iZiI6MTczOTE4MjgzMSwicGF0aCI6Ii83ODMxODk1LzI0MzUwNzk1NS0yNWZhOWU0NC1iZDcxLTQxYzgtYTkxNi04YWVlMGM4OTE5MzMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTBUMTAyMDMxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Zjg2MTYyMjMwMDM5ZDY0NTUwMWE0NTk4NGY0YjVjMTNlNGMwM2NjOGUzNTliZDY2ZmNkZWU3NzI0NmFlOTMzYiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.IC0IrUOSsQ71AkhIHpcZB4FBGpUPfO1znjL4gw7yPE0)
Whereas normally I'd expect a shinylive app to be there!
Note that if I don't have
embed-resources
, it works fine :) Thanks!The text was updated successfully, but these errors were encountered: