confl_create_post_from_Rmd {conflr} | R Documentation |
Publish R Markdown Document to 'Confluence'
Description
Knit and post a given R Markdown file to 'Confluence'.
Usage
confl_create_post_from_Rmd(Rmd_file, interactive = NULL, params = NULL, ...)
confluence_document(
title = NULL,
space_key = NULL,
parent_id = NULL,
type = c("page", "blogpost"),
toc = FALSE,
toc_depth = 7,
code_folding = c("none", "hide"),
supported_syntax_highlighting = getOption("conflr_supported_syntax_highlighting"),
update = NULL,
use_original_size = FALSE,
interactive = NULL
)
Arguments
Rmd_file |
Path to an .Rmd file. |
interactive |
If |
params |
If provided, a list of named parameters that override custom params in the YAML front-matter. |
... |
Arguments passed to |
title |
Title of the post. |
space_key |
The space key to find content under. |
parent_id |
The page ID of the parent pages. |
type |
The content type to return. Default value: |
toc |
If |
toc_depth |
The max level of headers to include in the table of contents. |
code_folding |
If |
supported_syntax_highlighting |
A named character vector of supported syntax highlighting other than default (e.g. |
update |
If |
use_original_size |
If |
Details
All options of confluence_document()
can also be specified via the argument
of confl_create_post_from_Rmd
. If an option is specified on both, the one given
as an argument will be used.
--- title: "title1" output: confluence_document: space_key: "space1" parent_id: 1234 toc: TRUE toc_depth: 4 code_folding: hide supported_syntax_highlighting: r: r foo: bar update: true use_original_size: true --- ...
Value
confl_create_post_from_Rmd()
returns the URL of the published page.
confluence_document()
returns an rmarkdown_output_format
object.
Examples
example_Rmd <- system.file("extdata/example.Rmd", package = "conflr")
## Not run:
# Convert an R Markdown document into a 'Confluence' page interactively
confl_create_post_from_Rmd(example_Rmd)
# You can override most of the parameters of confluence_document()
confl_create_post_from_Rmd(example_Rmd, space = "space1", toc = TRUE)
## End(Not run)
## Not run:
# A custom R markdown format that can be passed to rmarkdown::render()
format <- confluence_document(space_key = "space1")
rmarkdown::render(system.file("extdata/example.Rmd", package = "conflr"), format)
## End(Not run)