rmarkdown icon indicating copy to clipboard operation
rmarkdown copied to clipboard

cannot exclude files/folders in subdirectories in _site.yml

Open rubenarslan opened this issue 8 years ago • 6 comments
trafficstars

As mentioned in #946

To reproduce:

Put a file in a project subfolder, try to ignore it via exclude: ['subfolder/bla.txt'].

When the site is knit, the file "bla.txt" is copied anyway.

It doesn't matter whether the thing in the subdirectory is a file or a folder. I also naively expected "subfolder/*" to work, but it didn't.

rubenarslan avatar Jan 29 '17 21:01 rubenarslan

Is there any update on this? exclude: ["folder1/", "folder2/"] seems to be rather basic, and should just work.

friendly avatar Dec 18 '17 16:12 friendly

@friendly No, we haven't got a chance to look at this issue. If you use blogdown, you will be able to exclude any files/dirs.

yihui avatar Dec 19 '17 01:12 yihui

@friendly IIRC excluding entire subfolders works (but might have to omit the slash), this issue was about single files in subfolders.

rubenarslan avatar Dec 19 '17 07:12 rubenarslan

Ah, omitting the slash works for folders notes/ and other-slides/ in the line below.

exclude: ["notes", "other-slides", "*.pptx", "*.bak", "*.doc"]

Specific extensions, like *.pptx or *.bak are not excluded in subfolders

friendly avatar Dec 19 '17 13:12 friendly

The OLD slash problem in rmarkdown when it comes to folders … What about handling all dirs with "/" as Long as possible and only directly before using it (in Windows enviroment and when it is needed (!!!)) converting it? ;-)

NMarkgraf avatar Jun 20 '18 16:06 NMarkgraf

Just came across this issue. It also arises when using the distill package, as far as I can tell.

clauswilke avatar Sep 01 '20 00:09 clauswilke