Is there the equivalent of .gitignore for Obsidian and Obsidian Publish?

What I’m trying to do

I want to have a templates folder the contents of which should either not be uploaded to the server or at least not visible to people browsing the site. Is this possible?

Things I have tried

I have no idea what to try, I’m a relatively new user and brand new to Publish