litedown
litedown copied to clipboard
Embedded resources not being cleaned
Apologies if I'm misunderstanding but it doesn't seem like embedded images (not checked when other resources are embedded) are being cleaned from disk. Minimal reprex ...
dir.create(dir <- tempfile())
file_in <- file.path(dir, "example.litedown")
text <- r"(---
output:
litedown::html_format
---
```{r}
plot(1:10,1:10)
```)"
cat(text, file = file_in)
list.files(dir, recursive = TRUE)
#> [1] "example.litedown"
litedown::fuse(file_in)
list.files(dir, recursive = TRUE)
#> [1] "example__files/chunk-1-1.png" "example.html"
#> [3] "example.litedown"
Hope this makes sense.
You are right. This hasn't been done in litedown yet. Thanks for the reminder!
Done now. Plot files are cleaned up by default. To keep them, set embed_cleanup: false, e.g.,
output:
litedown::html_format:
options:
embed_cleanup: false