Description Usage Arguments Value Note See Also Examples
View source: R/html_password_protected.Rmd.R
An R Markdown output format to encrypt and password protect an HTML
document using charm()
. secret_keeper()
is an alias for
html_password_protected
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | html_password_protected(
output_format = "rmarkdown::html_document",
password,
hint = NULL,
style = list(),
bundle = FALSE,
minified = TRUE,
preview = FALSE,
...
)
secret_keeper(
output_format = "rmarkdown::html_document",
password,
hint = NULL,
style = list(),
bundle = FALSE,
minified = TRUE,
preview = FALSE,
...
)
|
output_format |
An R Markdown format that renders to HTML. By default,
will render to the standard --- output: fidelius::html_password_protected: output_format: rmarkdown::html_document: toc: true --- |
password |
Private password to unlock file. If not provided, you will be asked to supply a password by a prompt if you are working from an interactive session. |
hint |
Optional public password hint. |
style |
Any number of style options that are configurable via
output: fidelius::html_password_protected: style: button_text: "Open Sesame!" |
bundle |
Logical. Should all of the decryption machinery and
dependencies be bundled into the HTML document? Default is |
minified |
Logical. Should minified versions of JavaScript dependencies
be included? Default is |
preview |
Logical. Set to |
... |
Not currently used. |
R Markdown output format based on output_format
to pass to
rmarkdown::render()
.
If you hard-code your password
into the YAML header of the document be
careful not to check the R Markdown file into a public version control
repository (e.g. git or GitHub) where the password is stored and visible
in plain-text. Please use this format carefully.
Try using xaringan::infinite_moon_reader()
with preview = TRUE
to
preview your document with automatic reloading of slides on change. When
you are done developing your document, set preview = FALSE
or remove it
from the YAML header entirely to encrypt and password protect your
document.
charm
for more information on the password protection and
encryption.
1 2 3 4 5 | ## Not run:
library(rmarkdown)
render("input.Rmd", html_password_protected())
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.