meeb / django-distill

Minimal configuration static site generator for Django
MIT License
441 stars 35 forks source link

distill-local needs static files, even when exclude static files option is selected: reason ? #52

Closed esskaey closed 2 years ago

esskaey commented 2 years ago

Hi meeb,

Does it make sense to do away with the check for static files check, when exclude static file generation argument is passed (distill-local.py :line 45-47)?

why was the check necessary when "not collectstatic" ?

Thanks in advance

BR SK

meeb commented 2 years ago

As a static site generator it made sense to check that you had collected your static files to be copied to the output directory before you could render the site. Without this check you could run distill-local with no warning and build a completely broken site if your site required CSS, images or any of the other typical static files.

I've just modified the logic slightly so that this check is not performed if you are also passing in the --exclude-staticfiles argument which should do what you want.

2.9.1 has been pushed to PyPI containing this patch.