Skip to content

1.0.0-beta.4

Pre-release
Pre-release
Compare
Choose a tag to compare
@daveaglick daveaglick released this 31 Aug 22:45
· 223 commits to main since this release
  • Updated Statiq Framework to version 1.0.0-beta.21.
  • Breaking change: Removed the IBootstrapper.SetDefaultTemplate() extension given more general use of templates. The "default" template should now be specified
    by setting a templates for the HTML media type (by default it's still Razor, so this breaking change won't really affect anyone right now).
  • Breaking Change: Removed the AssetFiles, DataFiles, and ContentFiles settings and replaced with a single InputFiles setting for finding all input files.
    The target pipeline and content type are now determined from the media type and metadata of the document instead of via globbing patterns for each pipeline.
    If you previously had asset files that started with an underscore (such as a _redirects file), you will need to explicitly add those to the InputFiles patterns
    along with the default pattern: .AddSetting(WebKeys.InputFiles, new [] { "**/{!_,}*", "_redirects" }).
  • Added a ClearDataContent document setting that clears content from data documents (for example, to support passing the data file to layouts).
    Set this for a single data document to clear it's content or globally with .AddSetting(WebKeys.ClearDataContent, true) to clear the content of all data files.
  • Made the concept of "templates" more general. They now essentially use the media type of a document (typically inferred from file extension) to determine which pipeline to
    process the document in and what module to use for processing. Templates can now be defined for assets, data, and content and for the Process and PostProcess phases for each.
  • Added a ContentType document setting to override the calculated pipeline and processing for a document (values are Asset, Data, and Content).
    For example, setting the ContentType of a file named "foo.json" to Asset will treat the file as an asset and will not process it's content as data.
  • Added a MediaType document setting to override the media type calculated from the file extension.
  • Added a RemoveScriptExtension document setting that will convert script file names like "foo.json.csx" to "foo.json" and reset their media types so the script output can be seamlessly
    processed by the appropriate pipeline and modules (for example, "foo.json.csx" will get processed by the Data pipeline while "foo.md.csx" will get processed by the Content pipeline).
    The default value is true.
  • Removed the Isolated flag from the Assets pipeline so the set of copied assets can be retrieved from other pipelines (I.e. to generate a list of images in a directory).
  • Added support for script files (.csx or .cs) to the Archive pipeline (I.e. to generate JSON APIs from a collection of documents or data).
  • Added a Script document setting that will treat a file as a C# script, even if the extension is not .cs or .csx.
  • Added a common Inputs pipeline that consolidates directory metadata, sidecar, and front matter parsing and supports evaluating scripts with a .csx or .cs extension.
    Detailed script usage will be documented on the site, but generally if the script returns null the original input document is returned, if the script returns a string the content
    of the document will be changed to the return value, or if the script returns a document(s) those will be added to the appropriate pipeline.
  • New Statiq.Web.Templates project with a Statiq Web templates for the dotnet new CLI command (#915, thanks @devlead).