Read the body of a document (content after frontmatter)
Source:R/parse-quarto.R
parse_quarto_body.RdStrips the YAML frontmatter block and any leading blank lines, returning
only the document content. Used by build_llms_docs() to assemble
rendered page content into llms-full.txt. Returns NULL for missing
files so the caller can decide whether to fail or skip.
Value
A character string of the document body with frontmatter and leading
whitespace removed, or NULL if the file does not exist.
See also
Other extraction:
parse_quarto_yaml()
Examples
path <- tempfile(fileext = ".md")
writeLines(c(
"---",
"title: Example",
"---",
"",
"First paragraph.",
"Second paragraph."
), path)
parse_quarto_body(path)
#> [1] "First paragraph.\nSecond paragraph."