Knit and post a given R Markdown file to 'Confluence'.

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,
  minor_edit = FALSE,
  interactive = NULL
)

Arguments

Rmd_file

Path to an .Rmd file.

interactive

If FALSE, shiny interface is not launched.

params

If provided, a list of named parameters that override custom params in the YAML front-matter.

...

Arguments passed to confluence_documents().

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: page. Valid values: page, blogpost.

toc

If TRUE, include a table of contents in the output.

toc_depth

The max level of headers to include in the table of contents.

code_folding

If "hide", fold code blocks by default.

supported_syntax_highlighting

A named character vector of supported syntax highlighting other than default (e.g. c(r = "r")).

update

If TRUE, overwrite the existing page (if it exists).

use_original_size

If TRUE, use the original image sizes.

minor_edit

If TRUE, will mark the update as a minor edit not notifying watchers.

Value

confl_create_post_from_Rmd() returns the URL of the published page.

confluence_document() returns an rmarkdown_output_format object.

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
    minor_edit: false
---

...

Examples

example_Rmd <- system.file("extdata/example.Rmd", package = "conflr") if (FALSE) { # 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) } if (FALSE) { # 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) }