Skip to content

Add info about figures in article about precomputing vignettes #1263

@Aariq

Description

@Aariq

The article about precomputing vignettes has a caveat that if your vignette includes figures, you must take care to save them to the vignettes/folder. It would be nice to have an example of how to do that. I was thinking this might do the trick:

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "vignettes/"
)

But the figure generated in the pre-compute step doesn't get moved to doc/ by build_vignettes() or to docs/articles/ by pkgdown::build_site() and the images don't show up in the rendered HTML. Do I need to just manually (or with a script) move the figures to the correct spot(s)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions