markdoc icon indicating copy to clipboard operation
markdoc copied to clipboard

Excluding static files?

Open artob opened this issue 15 years ago • 2 comments

Is there a way to exclude certain static files being synced, using wildcard matching for example?

An issue I've been seeing is that if I e.g. edit my robots.txt, my editor will leave a robots.txt~ backup file lying around; as I'm sure you know, this is a fairly common convention in shell-based editors. Unfortunately, that backup file then gets copied to .html/robots.txt~ when I do a markdoc build. Not that it's a huge problem, but it is a little annoying.

If the build process ignored ~ files, that'd solve the specific issue above. But even more useful (if wishes were horses) would be the ability to exclude patterns of files, including then "*~". This would come very handy in repositories where the static files are located directly on the top level, meaning that some extraneous non-static files get copied in the build process as well, particularly README.md and Rakefile in my typical use cases.

I bet you've already thought of this, and I have just overlooked it in the documentation ;-)

artob avatar Sep 15 '10 10:09 artob

I’ve figured out the perfect solution; it’ll be landing in the code shortly. See the documentation for rsync’s --cvs-exclude option here. It’ll be on by default, with the option to switch it off in your markdoc config.

All editor backup files will be ignored, and you’ll be able to use .cvsignore files to exclude specific files/patterns.

zacharyvoase avatar Sep 17 '10 14:09 zacharyvoase

All right, sounds perfect - thank you, and looking forward to it :-)

artob avatar Sep 17 '10 14:09 artob