ignoreFiles not working in Windows

I’ve used the following ignoreFiles setting in OSX to help improve Hugo’s speed - it works great for local dev:

ignoreFiles = [“post/2003”,“post/2004”,“post/2005”,“post/2006”,“post/2007”,“post/2008”,“post/2009”,“post/2010”,“post/2011”,“post/2012”,“post/2013”,“post/2014”]

When I tested on Windows, I noticed it didn’t work. I figured it was perhaps the slashes, so I added to the end of my list:

“post\2003”,“post\2004”

just as a quick test, and Hugo still processes items from those years. Any idea why?

I also tried post[\/]2003 as a way to handle both Win/OSX in one match, but that failed :slightly_smiling:

So I went with

.*200X.*

and it seems to work well, and I’m assuming will work fine back on OSX.

Just as an FYI, the forum system here is stripping out some of my characters. It should be “period asterix” not just period in the example above.

The patterns are regular expressions (regex). In regex, “” starts an escape sequence. Something like this should work: post[/\\][0-9]{4}. Translated, that matches “post” followed by “” or “/”, which is then followed by 4 digits.

1 Like

Thanks.