From 336bbf841b2025b04659377ee34afe85760f9a5b Mon Sep 17 00:00:00 2001 From: Garrick Aden-Buie Date: Fri, 12 Jul 2024 11:31:11 -0400 Subject: [PATCH] feat: Add warning to code chunk about embed-resources --- _extensions/quarto-ext/shinylive/shinylive.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/_extensions/quarto-ext/shinylive/shinylive.lua b/_extensions/quarto-ext/shinylive/shinylive.lua index 6890a7a..a8ce817 100644 --- a/_extensions/quarto-ext/shinylive/shinylive.lua +++ b/_extensions/quarto-ext/shinylive/shinylive.lua @@ -458,6 +458,13 @@ return { el.attr.classes = pandoc.List() el.attr.classes:insert("shinylive-r") end + + el.text = + "#| '!! shinylive warning !!': |\n".. + "#| shinylive does not work in self-contained HTML documents.\n" .. + "#| Please set `embed-resources: false` in your metadata.\n" .. + el.text + return el end }