add <- structure(function(key, figure, caption, type){
env = specenv(type)
# index the figure
assign(key, figure, envir=env)
# add the caption
addcaption(key, caption, envir=env)
invisible(NULL)
}, ex=function(){
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.