Skip to content

Commit

Permalink
Added support for "HTML fragment" files with a .fhtml extension and n…
Browse files Browse the repository at this point in the history
…o longer process .html files with templates (#933)
  • Loading branch information
daveaglick committed Dec 1, 2020
1 parent e882993 commit 22169db
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<!-- Controls whether references are local projects or NuGet packages -->
<LocalReferences>false</LocalReferences>
<!-- The NuGet version of Statiq that should be referenced if LocalReferences is false -->
<StatiqFrameworkVersion>1.0.0-beta.30</StatiqFrameworkVersion>
<StatiqFrameworkVersion>1.0.0-beta.31</StatiqFrameworkVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down
1 change: 1 addition & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# 1.0.0-beta.16

- Updated Statiq Framework to version [1.0.0-beta.31](https://github.com/statiqdev/Statiq.Framework/releases/tag/v1.0.0-beta.31).
- **Breaking change:** By default `.html` files are no longer processed by a layout engine like Razor, instead use `.fhtml` (HTML fragment) to indicate the file should be processed (#933).
- Added a short wait to the file watcher to avoid file lock exceptions under certain conditions.

# 1.0.0-beta.15
Expand Down
2 changes: 1 addition & 1 deletion src/Statiq.Web/Templates/Templates.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ internal Templates()
}
return null; // If no layout metadata, revert to default behavior
}))));
Add(MediaTypes.Html, this[MediaTypes.Razor]); // Set Razor as the default for HTML files
Add(MediaTypes.HtmlFragment, this[MediaTypes.Razor]); // Set Razor as the default for HTML fragment files, don't process full HTML files as part of a template, they're assumed to be complete
}

/// <summary>
Expand Down

0 comments on commit 22169db

Please sign in to comment.