spanezz / staticsite

Static site generator
GNU General Public License v3.0
45 stars 7 forks source link

Provide filter for files excluded from site #63

Closed hartmans closed 1 year ago

hartmans commented 1 year ago

I'm an Emacs user, and I'd like to exclude my editor backup files from the generated site.
With the code today, I end up with things like index.md~ ending up copied as assets into the generated site. Obviously I can git clean before publishing or go set up some sort of CI pipeline, but for some of my sites that's more infrastructure than I need. So I'd like a setting that allows me to exclude files matching a particular predicate from consideration

spanezz commented 1 year ago

You should now be able to add ignore: ['*~'] to .staticfile to get rid of those files

hartmans commented 8 months ago

It looks like .staticfile was renamed to .staticsite at some point. There are comments referring to .staticfile in fstree.py and features/jinja2.py, but the code (and content.md in the reference documentation) appears to use .staticsite.

It is my intent to submit a PR fixing the references to .staticfile although that's a few items down on my stack.