shortcode | R Documentation |
Generate a hugo shortcode with appropriate pandoc markup to preserve it as is when embedded in an R markdown document.
Generally, I don't recommend calling this function directly; instead
use it inside a function with the same name as the shortcode you want to
wrap. See embed_gist()
and friends for examples
shortcode( .name, ..., .contents = NULL, .output = c("html", "md"), .inline = FALSE )
.name |
Name of the shortcode |
... |
Arguments to the shortcode, supplied either by name or
position depending on the shortcode. By default, strings will
automatically be quoted with single quotes. Suppress this quoting
by wrapping the argument in |
.contents |
Contents of the shortcode for paired shortcodes. |
.output |
Is the output of the shortcode html or markdown? This
controls whether the shortcode uses |
.inline |
Is the shortcode designed to be used inline or in its own paragraph? Controls whether the shortcode is wrapped in a block or inline raw attribute. |
pkg <- function(name) { shortcode("pkg", name, .inline = TRUE) } pkg("hugodown")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.