Skip to contents

Emits the chapters: entries for a Quarto book, in schedule order, so the book config can be kept in step with the outline rather than by hand.

Usage

chapters_yaml(path = "schedule.md", index = TRUE, quiet = FALSE)

Arguments

path

Path to a markdown outline. Defaults to "schedule.md".

index

Include index.qmd as the first chapter? Quarto books expect one, and it won't come from the schedule.

quiet

Suppress printing to the console and return the lines only. Used by use_chapters(), which writes them to a file instead.

Value

Invisibly, a character vector of YAML lines. Printed to the console for copying into _quarto.yml.

Examples

schedule <- system.file("extdata", "schedule.md", package = "rithmatist")
chapters_yaml(schedule)
#>   chapters:
#>     - "index.qmd"
#>     - "project-organisation.qmd"
#>     - "code-style-and-readability.qmd"
#>     - "writing-readable-code.qmd"
#>     - "writing-functions.qmd"
#>     - "writing-a-reprex-getting-unstuck.qmd"
#>     - "putting-it-all-together.qmd"
#>