statiqdev / Statiq.Web

Statiq Web is a flexible static site generator written in .NET.
https://statiq.dev/web
Other
1.64k stars 235 forks source link

Don't apply layouts to HTML files #933

Closed daveaglick closed 3 years ago

daveaglick commented 3 years ago

If we've got a full HTML file we shouldn't apply layouts and other templates. I.e. it's assumed the HTML file is complete. Instead we should consider some alternate extension to indicate HTML-like content that should have layouts applies (is there any established extension or convention for this?).

daveaglick commented 3 years ago

Interesting discussion of file extensions for HTML fragments at https://stackoverflow.com/questions/811887/what-extension-should-i-use-for-files-containing-fragments-of-html. Our requirements a little unique in that it has to be a separate extension since we need to map it to a media type for template processing.

daveaglick commented 3 years ago

This is done, shipping now. Ended up settling on .fhtml for HTML fragments that should get processed by templates.