Skip to content

Clean up figure paths in vignettes#43

Merged
petersonR merged 5 commits into
masterfrom
fix_vignette_image_paths
May 30, 2025
Merged

Clean up figure paths in vignettes#43
petersonR merged 5 commits into
masterfrom
fix_vignette_image_paths

Conversation

@Andrew0Hill
Copy link
Copy Markdown
Collaborator

This PR addresses #42 by cleaning up the vignette image paths.

My proposed structure is:

  • A figures/ directory under the vignettes/ directory.
  • Each vignette/article that uses figures has a subdirectory under figures/ with a name matching the name of the article (i.e. for an article titled my_article.Rmd, any images should be stored in the figures/my_article directory.

I cleaned up the 3 existing articles which use images to follow the above structure, and verified that the articles still build correctly locally (if someone could verify independently that would be great!)

@ChristopherMancuso
Copy link
Copy Markdown
Collaborator

ChristopherMancuso commented May 27, 2025

@Andrew0Hill when you say build correctly locally do you mean something different than knitting the rmd file? Or you talking about packagedown? I've never used package down is this what I would do?

install.packages("pkgdown")
Run once to configure your package to use and deploy pkgdown
usethis::use_pkgdown_github_pages()
Preview your site locally before publishing
pkgdown::build_site()

and do this from the main directory of the branch?

@Andrew0Hill
Copy link
Copy Markdown
Collaborator Author

Andrew0Hill commented May 27, 2025

I've just been doing:

install.packages("pkgdown")
pkgdown::build_site()

That will try to generate the HTML pages for everything and then launch the (local) site in your browser.

@ChristopherMancuso
Copy link
Copy Markdown
Collaborator

I checked this out I was able to see that all the images and the vignettes were built correctly. I think I have some things to learn about build_site() as I had to run that command a number of times and then manually install a number of packages I didn't have when it would fail to run. I got it to woke in the end though.

@petersonR petersonR merged commit 94e8951 into master May 30, 2025
6 checks passed
@petersonR
Copy link
Copy Markdown
Member

Thanks! Closing/merging now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants