Skip to contents

Add code block

Usage

add_code(
  content,
  code,
  language = "r",
  caption = NULL,
  filename = NULL,
  tabgroup = NULL
)

Arguments

content

A content_collection, viz_collection, or page_object

code

Code content

language

Programming language for syntax highlighting

caption

Optional caption

filename

Optional filename to display

tabgroup

Optional tabgroup for organizing content (character vector for nested tabs)

Value

Updated object (same type as input)