Description Usage Arguments Functions Super classes Methods
This application's primary purpose is to serve HTML to its users as a front-end application.
1 | autoreload_assets(interval = 1L, libs = "assets")
|
interval |
(int) number of seconds between checks |
libs |
(pth) path to libs folder |
autoreload_assets
: Autoreload assets
webtools::Configurable
-> webtools::Plugin
-> HTMLPlugin
new()
Create a new HTMLApp
HTMLPlugin$new( html = pkg_user("html"), libs = "assets", lang = "en", autoreload = getOption("webtools.autoreload", FALSE), interval = getOption("webtools.autoreload.interval", 1L) )
html
(pth) filesystem directory HTML will be rendered
libs
(pth) path relative to the html
for dependencies
lang
(str) string indicating the language. defaults to en
autoreload
(flg) for development, refreshes the page when the server reinstantiates itself
interval
(int) seconds between interval checks
...
(arg) arguments passed to App
superclass
on_attach()
Attach an HTMLCapability
HTMLPlugin$on_attach(app)
app
(App) app isntance to attach capability to
router()
HTML route for {htmltools}
tags
Then handler function must return objects of class shiny.tag.list
or
shiny.tag
. At the end of the process, the HTML tags are rendered
and static CSS/JS assets placed in the root /assets
path.
Some special configuration:
Add dependencies to self$config$html$extra_deps
if you want to
add things without worrying about handler order. It will be added to
the tags at the last step
HTMLPlugin$router(path, handler, ..., lang = NULL, fragment = FALSE)
path
(str) endpoint
handler
(fun) handler; must have arguments
request
, response
, keys
, ...
and
set the body to html tags
...
(arg) passed to super$router()
lang
(str) string indicating the language. defaults to en
fragment
(flg) whether to return a full page or fragment
clone()
The objects of this class are cloneable with this method.
HTMLPlugin$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.