Skip to content

Commit

Permalink
try using absolute paths...
Browse files Browse the repository at this point in the history
  • Loading branch information
rempsyc committed Oct 30, 2023
1 parent 1b6d466 commit 07ab1b9
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions R/utils-rmd.R
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,8 @@
altdoc:::.folder_is_empty(vignettes_path)) {
return(invisible())
}
articles_path <- "docs/articles/"
good_path <- altdoc:::.doc_path(path)
articles_path_full <- paste0(good_path, "/articles")

articles_path <- paste0(good_path, "/articles/")

if (!fs::dir_exists(articles_path)) {
fs::dir_create(articles_path)
Expand All @@ -104,16 +102,15 @@
# Move images generated through code
vignettes_folders <- gsub(".Rmd", "_files", vignettes)
vignettes_folders <- paste0(articles_path, vignettes_folders, "/figure-gfm")
fig_path <- gsub(articles_path, "docs/articles/figures/", vignettes_folders)
# fig_path <- "articles/figures"
fig_path <- gsub("articles/", "articles/figures/", vignettes_folders)

lapply(seq_along(vignettes_folders), function(x) {
if (dir.exists(vignettes_folders[x])) {
fs::dir_copy(vignettes_folders[x], fig_path[x])
}
})

vignettes_md <- list.files(articles_path_full, pattern = ".md$", full.names = TRUE)
vignettes_md <- list.files(articles_path, pattern = ".md$", full.names = TRUE)

# Edit vignettes to update figure URLs
for (y in vignettes_md) {
Expand Down

0 comments on commit 07ab1b9

Please sign in to comment.