zacharyvoase / markdoc

A lightweight Markdown-based wiki system. Current status: abandoned.
http://markdoc.org/
The Unlicense
347 stars 74 forks source link

Excluding static files? #3

Open artob opened 14 years ago

artob commented 14 years ago

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 ;-)

zacharyvoase commented 14 years ago

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.

artob commented 14 years ago

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