getpelican / pelican

Static site generator that supports Markdown and reST syntax. Powered by Python.
https://getpelican.com
GNU Affero General Public License v3.0
12.49k stars 1.81k forks source link

Overwrite protection for static files generator #3097

Open fornib opened 1 year ago

fornib commented 1 year ago

Feature Request

When there is mixed content in the same directory, static files may overwrite generated pages without warning. This is undesirable, as you may not notice the lost information.

I propose to at least check writer._written_files before copying/linking static files and, if overwriting, just print a warning (without raising RuntimeError, as it would break existing websites).

justinmayer commented 1 year ago

Related issue from a decade ago: #446