wfow_toc creates a table of contents of the published R Markdown
files. The output is in markdown format, so you can paste it into a document
index.Rmd. If the R package
clipr is installed, the
table of contents is copied to the clipboard. Otherwise the output is sent to
the R console.
wflow_toc(ignore_nav_bar = TRUE, clipboard = TRUE, project = ".")
logical (default: TRUE). Ignore any HTML files included as links in the navigation bar.
logical (default: TRUE) Attempt to copy table of contents to clipboard. Only relevant if clipr package is installed and the system keyboard is available.
character (default: ".") By default the function assumes the current working directory is within the project. If this is not true, you'll need to provide the path to the project directory.
Invisibly returns the table of contents as a character vector.
The default behavior is to attempt to copy the table of contents to the clipboard for easy pasting into an R Markdown document. If this isn't working for you, you can try the following: