11ty / eleventy

A simpler site generator. Transforms a directory of templates (of varying types) into HTML.
https://www.11ty.dev/
MIT License
17.13k stars 493 forks source link

Remove `htmlOutputSuffix` Common Pitfall when input and output directories match. #3327

Closed zachleat closed 4 months ago

zachleat commented 4 months ago

Read more about what happens when you use the same directory for input and output: https://v2-0-1.11ty.dev/docs/languages/html/#using-the-same-input-and-output-directories

Read more about what the htmlOutputSuffix feature did: https://v2-0-1.11ty.dev/docs/config/#change-exception-case-suffix-for-html-files


From a GitHub search this feature is almost never modified from default: https://github.com/search?q=htmlOutputSuffix&type=code&p=1

Double processing templates should simply throw an error. Removing this feature would result in duplicate permalink errors.

Run 1:
README.md -> README/index.html

Run2:
README.md -> README/index.html
README/index.html -> README/index.html (duplicate permalink error)
zachleat commented 4 months ago

Alternatively:

./index.html -> ./index.html (should also error)