Process Document Section Content
process_section.RdProcesses a section of a document by either rendering a template with data or including raw content. Used for building modular documents from templates and includes.
Arguments
- section
A list containing section configuration with elements:
name: Character string, name of the section
use_template: Logical, whether to use template rendering
content: Optional character vector of raw content (used if use_template is FALSE)
- data
A list of data to be used for template rendering
- template_dir
Character string specifying the directory containing templates. Defaults to "template-files".