Use this function to embed a svelte app from a directory / file-path into your output document (needs to be html). Check out this article for the svelte-app setup: https://jmbuhr.de/svelteR/articles/svelteR.html
include_svelte(name, path, props, self_contained = TRUE)
name | :: String, name of the svelte app, usually the same as the name of the directory |
---|---|
path | :: String, File path to the svelte-app publish directory. e.g. "svelte-app/docs" or "svelte-app/public" |
props | :: List, An R list of properties passed to the svelte-app. Will be automatically converted to JSON. |
self_contained | :: Boolean. By default, Rmarkdown's html_document is
self contained, meaning it includes all images and external code automatically
into one html file. Setting |
Code that is inserted into the output document