- Added some optimizations for async file I/O.
- Added overloads to
FilterSources
andFilterDestinations
modules that acceptConfig<IEnumerable<string>>
for the patterns. - Fixed
IDirectory.GetFiles()
andIDirectory.GetDirectories()
to make sure excluded paths are excluded from the results. - Creating a
ReadFiles
module without any patterns now returns all files. - Added
ExtractFrontMatter.RequireStartDelimiter()
to require the front matter to start with a specified delimiter on the first line (for example,/*
as the opening of a comment block). - Added
IMetadata.ToJson()
utility extensions to serialize anIMetadata
object to JSON. - Fixed a bug where the
EvaluateScript
module would reset the document media type for content return values. - Added a new
glob eval
command to evaluate a globbing pattern against a specified directory and report all the matches. - Added a new
glob test
command to test a specified path against a globbing pattern to see if it matches. - Removes subresource attributes in
MirrorResource
(#127). - Updated Spectre.Cli CLI library for better console help messages.
- Added a new
ReadApi
module for generally reading from an API client (#126, thanks @unchase). - Added
IBootstrapper.ModifyPipeline()
to make it easier to modify an existing pipeline via the bootstrapper. - Added collection initializer and list support to the
ExecuteBranch
module.
- Breaking change: Removed the
IDocument.GetParent()
,IDocument.HasChildren()
,IDocument.GetDescendants()
, andIDocument.GetDescendantsAndSelf()
extension methods (IDocument.GetChildren()
still remains since it's fetching actual metadata values). Instead, the appropriate tree concept can now be accessed via an implementation of theIDocumentTree<TDocument>
interface. This change may break navigation, soOutputs
orOutputPages
should be considered for generating navigation instead. - Added an
OutputPages
property to the engine and execution context to make it easier to filter outputs by "pages" (by default, documents with a destination path ending in ".htm" or ".html"). This is what you should use to generate navigation going forward. - Added
Outputs.Get()
andOutputPages.Get()
to support getting a single document from those collections by destination path, which is faster than globbing. - Added a
IDocumentTree<TDocument>
interface to encapsulate different kinds of document tree traversal logic. - Added a
DocumentMetadataTree<TDocument>
implementation to represent document trees as the result of metadata containing child documents. - Added a
DocumentPathTree<TDocument>
implementation to represent document trees as the result of file paths. - Added a
IEnumerable<TDocument>.AsMetadataTree()
extension method to get aDocumentMetadataTree<TDocument>
instance that creates a tree from document metadata containing child documents. - Added a
IEnumerable<TDocument>.AsDestinationTree()
extension method to get aDocumentPathTree<TDocument>
instance that creates a tree from document destination paths. - Added a
IEnumerable<TDocument>.AsSourceTree()
extension method to get aDocumentPathTree<TDocument>
instance that creates a tree from document source paths. - Added a new
FilteredDocumentList<TDocument>
return type forIEnumerable<TDocument>.FilterDestinations()
andIEnumerable<TDocument>.FilterSources()
calls (includingOutputs[string[] patterns]
) which implements the newIDocumentTree<TDocument>
and lets you treat the resulting filtered documents as a tree from the filter return. - Added the
IDocumentTree<TDocument>
interface toIPipelineOutputs
with default implementations that operate on document destination paths. This means you can call methods likeOutputs.GetChildren(doc)
to get all the children across all pipelines of the given document, etc. - Added a new
IndexFileName
setting to control the default file name of index files (defaults toindex.html
). - Added a new
PageFileExtensions
setting to control the default file extensions of "pages" for things likeOutputPages
filtering and link generation (defaults to ".html" and ".htm"). - Added a new constructor to the
SetDestination
module that will change the destination of documents to the first value of thePageFileExtensions
setting (default of ".html"). - Added a new
MinimumStatiqFrameworkVersion
key to perform a check for the minimum allowed version of Statiq Framework. If this is set to something higher than the current version of Statiq Framework, an error will be logged and execution will stop. Any setting that starts will this key will be considered, so it's recommended the use of this key be suffixed with a unique identifier to avoid conflicts between components (for exampleMinimumStatiqFrameworkVersion-MySite
). - Refactored settings and configuration implementations. You shouldn't notice anything usage-wise, but keep an eye out for anything that doesn't work as expected
- Lots of under-the-hood refactoring to make things faster.
- Fix for invalid URIs in the
ValidateLinks
module (#119).
- Breaking change: Changed the IPipelineOutputs
indexer to filter documents by destination path from all pipelines instead of get documents from a specified pipeline. To use the previous behavior, call
IPipelineOutputs.FromPipeline(string). This will make the more common case (finding a document or documents among all pipelines) easier. To refactor your code to match the old behavior, do a string search for "Outputs[" and replace with
Outputs.FromPipeline()`. - Breaking change: Changed the
DocumentList<TDocument>
indexer to return all matching documents instead of the first matching document. To refactor your code to match the old behavior add a.FirstOrDefault()
after the call to the indexer. - Breaking change: Removed the
CompileScript
module in favor of global script caching (so using theEvaluateScript
module will also cache the script compilation, removing the need for a separate cached assembly). - Breaking change: Removed all but a single string-based evaluation method from
IScriptHelper
to promote global script compilation caching. - Breaking change: Removed global metadata properties from scripted documents, metadata, and shortcodes due to performance penalty and inability to cache across documents.
Uses of global properties that refer to other metadata will have to be replaced with
Get()
variants. For example, a scripted metadata value=> Foo
should become=> Get("Foo")
. - Breaking change: Renamed the
AbsolutizeLinks
module toMakeLinksAbsolute
for clarity and to match with the newMakeLinksRootRelative
module. - Added a new
MakeLinksRootRelative
module. - Added a
IEnumerable<IDocument>.ContainsById(IDocument)
extension method to determine if a sequence contains an equivalent document by ID. - Added a new
ConcurrentCache<TKey, TValue>
helper class that usesLazy<T>
, which improves performance of internals by avoiding duplicate value factory evaluation. - Script compilations are now globally cached, dramatically improving performance of scripted documents, metadata, and shortcodes.
- Fixed some bugs with the
CacheDocuments
module and document hash code generation. - Added a
IComparer<T>.ToConvertingComparer()
extension method that converts a typed comparer into aIComparer<object>
that performs type conversions. - Added a
IEqualityComparer<T>.ToConvertingComparer()
extension method that converts a typed comparer into aIComparer<object>
that performs type conversions. - Added a
RemoveTreePlaceholders
module to remove tree placeholder documents without flattening. - The
MergeMetadata
andMergeDocuments
modules no longer merge settings (since they're inherited by the document regardless). - Added
IMetadata.WithoutSettings()
to return filtered metadata without any settings values. - Added the key being requested to
IMetadataValue.Get()
so that metadata values can use it if needed. - Added recursive metadata expansion detection of
IMetadataValue
metadata values (it will now throw an error so you know which key is recursively expanding). - Added a
RenderSectionOrPartial(string sectionName, string partialName)
helper to the base Razor page. - Added feed metadata to the output documents from
GenerateFeeds
. - Added a new
AddRtlSupport
module inStatiq.Html
that automatically adds RTL attributes to HTML elements (#113, #15, thanks @encrypt0r). - Added a
IEnumerable<IDocument>.RemoveTreePlaceholders()
extension method. - Added an option to remove tree placeholder documents in the
FlattenTree
module and theIEnumerable<IDocument>.Flatten()
extension methods. - Added
settings
as a default settings file name (with support for JSON, YAML, or XML formats). - Added support for
appsettings
andstatiq
YAML (.yml
and.yaml
) and XML (.xml
) configuration files. - Added containing types to the symbol ID for nested symbols in the
AnalyzeCSharp
module (#116). - Added a message about using a higher log level when an error occurs (#115).
- Fixed a bug on engine reruns (I.e. the Statiq.Web preview command).
- Made
RenderRazor.WithLayout()
take precedence over an available_ViewStart.cshtml
file (by ignoring the_ViewStart.cshtml
file entirely which previously took precedence in this case). - Fixed some bugs with input-relative path finding for Razor layouts and partials (#102).
- Added
NormalizedPath.ContainsDescendantOrSelf()
. - Added
NormalizedPath.ContainsChildOrSelf()
. - Fixed several bugs with the implementation of
NormalizedPath.GetRelativeOutputPath()
. - Added a
IReadOnlyFileSystem.GetRelativeOutputPath()
extension. - Added a
IReadOnlyFileSystem.GetRelativeInputPath()
extension. - Added
IFileSystem.ExcludedPaths
to indicate input paths that should be excluded from processing. - Added
.GetInstance(Type)
and.GetInstance<TType>()
methods to theClassCatalog
. - Fixed a bug where custom commands were being added twice (#103).
- Fixed a bug in the
GenerateRedirects
module for original files ending in.htm
(#105). - Updated
Spectre.Cli
to version 0.35.0 with better internal command registration (#110, thanks @patriksvensson). - Removed restriction on only using
IDocument
models in Razor (#108, #23, thanks @alanta).
- Added the new
Statiq.App.props
file to abuildTransitive
folder in the package so it flows transitively to consumers.
- Fixed a bug with async context-based
Config
delegates not indicating that they don't require a document. - Added a
IReadOnlyPipelineCollection IExecutionState.ExecutingPipelines
property that provides the currently executing pipelines. - Added a new
ThrowExceptionIf
module that throws an exception if a condition is true. - Added a
Config<bool>.IsFalse()
extension method. - Added a
Config.ContainsAnySettings()
extension method. - Added
IReadOnlyDictionary<K, V>.ContainsAnyKeys()
extension methods. - Fixed a bug regarding disposal of a content stream in the
StartProcess
module. - Fixed a bug that required feed items to have URI IDs when the specification indicates they can also be arbitrary strings.
- Added a props file to the Statiq.App package to automatically set the default output exclusion and input content MSBuild props.
- Fixed a bug with the
OrderDocuments
module sorting by string value for default keys. - Changed
GatherHeadings
to take aConfig<int>
for specifying the level.
- Removed the
StreamContent
content provider in favor of the newMemoryContent
content provider (should also provide a nice performance boost since there's no more stream locking). - Added
IExecutionContext.GetContentProvider()
extensions that take abyte[]
buffer. - Added new
MemoryContent
content provider that wraps abyte[]
buffer. - Changed
IEngine.Settings
to be mutable, settings can now be added directly to the engine after instantiation. - Fixed a bug with case-insensitive settings from the command line.
- Fixed a bug with computed metadata settings from the command line.
- Added document flattening by default when using the
DocumentFileProvider
. - Added document flattening by default when using
IEnumerable<TDocument>.FilterSources()
andIEnumerable<TDocument>.FilterDestinations()
extensions. - Added a
IReadOnlyDictionary<TKey, TValue>.ContainsKeys()
extension utility method. - Added multiple key test to the
ExecuteIf
module.
- Fixed the
ProcessSidecarFile
module to pass the media type to child modules. - Added
IBootstrapper.RunTestAsync()
extensions to assist with testing entire bootstrappers. - Added
AsDependencyOf()
methods toPipelineBuilder
. - Added a collection initializer to
TestFileProvider
to make adding test files easier. - Added full
NormalizedPath
support toTestFileProvider
internals.
- Better engine and pipeline exception handling and log messages.
- Added a new
--debug
CLI flag to launch a debugger and attach it.
- Fix not to reuse a
HttpRequest
during retry, changed theHttpClient.SendWithRetryAsync()
and related methods to take a factory instead of a single request (#98). - Fix for a
PipelineBuilder
with no actions to return an empty pipeline. - Added
IBootstrapper.AddDeploymentPipeline()
overloads.
- Added
IReadOnlyDictionary<string, Type>
implementation toClassCatalog
. - Optimized
ScriptMetadataValue
metadata caching for big performance gains in certain scenarios. - Ensures that document metadata can't override the properties from
IDocument
(Id
,Source
,Destination
, andContentProvider
). - Removed the
ApplyDirectoryMetadata
module in favor of a more specific/powerful capability in Statiq Web (it never really made sense in Framework anyway). - Fixed default
GenerateSitemap
document destination to "sitemap.xml".
- Added a
IDocument.GetParent()
overload that uses the current execution context and doesn't require passing in a set of candidate documents. - The
GenerateFeeds
module now replaces relative links in item descriptions and content. - Added a new
AbsolutizeLinks
module toStatiq.Html
to turn all links in a document to absolute.
- Refactored the
ValidateLinks
module to acceptConfig<bool>
settings. - Changed shortcode semantics to only pass new metadata down (metadata is no longer merged up to host document, even though no existing shortcodes did that anyway).
- Refactored shortcodes to return a new
ShortcodeResult
object that includes content and nested metadata. - Consolidated shortcode base types to only return variations of
ShortcodeResult
(instead ofStream
andstring
versions as well). - Added the
ILogger
interface toIDocument
along with default implementations to support easier document logging with a document prefix (usually the source path).
- Added a
Markdown
shortcode to render Markdown content anywhere (for example, in another templating language like Razor).
- Added Handlebars media types.
- Added
WithInputDocument()
to theEnumerateValues
module to include the original input document in the enumeration. - Fixed some edge-case bugs in
LazyDocumentMetadataValue
. - Added
<?#^ ... /?>
as special syntax for theInclude
shortcode with the "^" character. - Added support for HTTP/HTTPS schemes to the
Include
shortcode for including web content. - Added
HttpClient.SendWithRetryAsync()
extension methods to send an HTTP request with a retry policy when aHttpClient
is available. - Added
IExecutionState.SendHttpRequestWithRetryAsync()
methods to send an HTTP request with a retry policy without needing anHttpClient
. - Removed the
ProcessIncludes
module in favor of theInclude
shortcode.
- The
OrderDocuments
module will now attempt to convert incompatible values. - Improved document path error messages to include path.
- Added support to
IDocument.ToDocument()
extensions to return or clone the original object if it's anIDocument
.
- Changed the
GenerateFeeds
module to order by descending publish date to meet feed conventions and adds aGenerateFeeds.PreserveOrdering(bool)
method to revert to old behavior (#92). - Fixed a bug with the
OptimizeFileName
stripping the path when optimizing the destination file name (#93). - Added support for casting the dynamic object returned from
IDocument.AsDynamic()
back to anIDocument
. - Added a new
IReadOnlyPipelineCollection
object and exposed it viaIExecutionState.Pipelines
to provide the current set of read-only pipelines during execution. - Added
IPipeline.GetAllDependencies()
extension methods to get the full set ofIPipeline.DependencyOf
andIPipeline.Dependencies
for a given pipeline. - Added
IPipeline.DependencyOf
to allow specifying which pipelines a given pipeline is a dependency of (the reverse ofIPipeline.Dependencies
). - Tweaked the way
NormalizedPath.OptimizeFileName()
handles dashes (it no longer removes them and does a better job of collapsing them). - Fixed
object.ToDocument()
andobject.ToDocuments()
extensions to construct theObjectDocument<T>
from the actual type of the object. - Added
IDocument.AsDynamic()
(moved from theRenderHandlebars
module, thanks @mholo65).
- Added Statiq.Handlebars and a
RenderHandlebars
module (#67, #90, thanks @mholo65). - Refactored the
OptimizeFileName
module and added some extra configuration methods. - Added
NormalizedPath.OptimizeFileName()
as both an instance method and static helper to clean up and optimize file names for the web. - Moved
ForEachDocument
andForAllDocuments
modules to Statiq.Common so they can be used as base module classes for extensions. - Fixed a bug with the
SetDestination
module when a string-based path is used that starts with a "." but isn't an extension. - Fixed an unusual edge-case bug when evaluating scripts with assemblies that have the same simple name (I.e. LINQPad queries).
- Added
IHtmlHelper.DocumentLink()
HTML helper extensions to Statiq.Razor. - Removed "theme" from the set of default input paths (added by default only in Statiq Web).
- Changed
CommandUtilities
in Statiq.App public. - Moved the serve command to Statiq Web.
- Moved the preview command to Statiq Web.
- Moved Statiq.Hosting to Statiq Web as Statiq.Web.Hosting.
- Moved Statiq.Aws to Statiq Web as Statiq.Web.Aws.
- Moved Statiq.Azure to Statiq Web as Statiq.Web.Azure.
- Moved Statiq.Netlify to Statiq Web as Statiq.Web.Netlify.
- Moved Statiq.GitHub to Statiq Web as Statiq.Web.GitHub.
- Moved
ActionFileSystemWatcher
to Statiq.Common and made it public. - Moved
InterlockedBool
to Statiq.Common and made it public. - Added
ShortcodeHelper
static class to Statiq.Common and moved shortcode argument parsing helper method there. - Moved HTML-based shortcodes to Statiq.Web.
- Removed the need to pass
IExecutionContext
to a bunch of different extension methods that can rely onIExecutionContext.Current
. - Added
IExecutionContext.HasCurrent
to check if a current execution context is available. - Changed
IExecutionContext.Current
to throw if no execution context is available. - Added
IDocument
extensions to clone documents from string orStream
content. - Added
IExecutionContext
extensions to create documents from string orStream
content. - Added
DocumentShortcode
andSyncDocumentShortcode
as base classes for single document-based shortcodes. - Added
ContentShortcode
andSyncContentShortcode
as base classes for simple string-based shortcodes. - Renamed
IMetadata.GetDocumentList()
toIMetadata.GetDocuments()
and added a newIMetadata.GetDocumentList()
that returns aDocumentList<IDocument>
. - Changed
IPipelineOutputs
andIEnumerable<IDocument>
extensions to returnDocumentList<TDocument>
. - Added
DocumentList<TDocument>
which wraps a set of documents, eliminating nulls, and provides an indexer for filtering destinations. - Added
IEnumerable<IDocument>.FirstOrDefaultSource()
andIEnumerable<IDocument>.FirstOrDefaultDestination()
extensions.
- Moved a bunch of
IBootstrapper
extensions to Statiq.Common so they're available from extension libraries in anIInitializer
. - Renamed
IConfigurableBootstrapper
toIBootstrapper
. - Added a new
IInitializer
interface that can be used for library/module initialization (but only when using theBootstrapper
). - Refactored the
RenderRazor
module to use the built-in service collection when possible. - Added a new
IServiceCollection.AddRazor()
extension to register Razor services out-of-band. - Refactored the
ClassCatalog
toStatiq.Common
and exposed it via theIExecutionState
interface. - Added
.WithSource()
to thePaginateDocuments
andGroupDocuments
modules. - Added a new
Keys.Order
key and made theOrderDocuments
module support it. - Added a
keepExisting
parameter to theGenerateExcerpt
module. - Removed some ambiguous
IShortcodeColletion.Add()
extensions. - Added a bunch of
Bootstrapper.AddShortcode()
extensions. - Added a new
ForAllDocuments
module that can act as a parent module to arbitrary child modules. - Added a new
If
shortcode (#789). - Added a new
ForEach
shortcode (#789). - Added a
TypeHelper.TryConvert()
method that takes a targetType
. - Added support for "script strings" to metadata get extensions (if the key starts with "=>" it will be treated as a script and evaluated instead of getting the metadata value directly).
- Refactored
IShortcode
to return multiple shortcode result documents and concatenates their content. - Modified
CreateTree
sort delegate to include theIExecutionContext
and to sort by input document order by default (instead of path/file name). - Added a
IDocument.IdEquals()
extension method. - Added a
IDocument.GetLink()
extension method that callsIExecutionContext.GetLink()
. - Added a
IDocument.HasChildren()
extension method. - Added an empty constructor to
OrderDocuments
that orders documents by theKeys.Index
value and then the file name by default. - Added a
IConfig.Cast<TValue>()
convenience extension method.
- Added
ctx
anddoc
shorthand properties to the scripted metadata script host. - Ensured that scripted metadata uses a strongly-typed property in the script host for metadata properties like
Source
andDestination
. - Added ".yml" to file extensions mapped to the "text/yaml" media type.
- Added ability to include all inputs in generated feeds from
GenerateFeeds
by setting maximum items to 0 - Refactored Statiq.Hosting usage of Newtonsoft.Json to System.Text.Json.
- Moved the
ParseJson
module into Statiq.Core, refactored it to use System.Text.Json, and removed theStatiq.Json
extension library. - Renamed
IMetadata.GetNestedMetadata()
toIMetadata.GetMetadata()
. - Added
TypeHelper.RegisterTypeConverter()
methods to register type converters at runtime. - Added a type converter that can convert
IMetadata
toIDocument
.
- Added support to
MergeDocuments
andMergeMetadata
for keeping existing metadata when merging. - Added a new
MergeContent
module that merges content from child modules to input documents. - Added an overload to the
SetContent
module that accepts a fullIContentProvider
. - Fixed a small bug with
MetadataDictionary
initialization when items contentIMetadataValue
orConfig<T>
values. - Added several new document metadata outputs to the
Paginate
module includePrevious
andNext
. - Added a new
LazyDocumentMetadataValue
that can be used to lazily find a given document as a metadata value (I.e. after cloning). - Renamed the "Transform" phase to "PostProcess" to better reflect the intended semantics and make it easier to explain.
- Added a phase timeline graphic to the execution summary output.
- Added some
Span<char>.Replace()
extension methods. - Added
NormalizedPath.ReplaceInvalidFileNameChars()
andNormalizedPath.ReplaceInvalidPathChars()
static methods. - Added
IMetadata.GetRawEnumerable()
and anIMetadata.GetRawEnumerable()
extension method to make enumerating raw key-value pairs easier. - Added a new
ExecuteBranch
module that can execute multiple branches of modules. - Added config overrides to the modules that operate on document sets.
- Fixes a bug with
MirrorResources
and files that contain "index" in their name. - Combines
FilePath
andDirectoryPath
into a single consolidated `NormalizedPath (#79). - Fixes a race condition in
Process.WaitForExit(int)
calls (thanks @duncanawoods).
- Added support for object-based settings to the bootstrapper (as opposed to just initial string-based configuration).
- Added support for
IConfig
metadata values. - Added
LastWriteTime
andCreationTime
toIFileSystemEntry
. - Fixed a race condition in
ScriptMetadataValue
. - Changed behavior of
SetDestination
when using a config value to makeDestinationPath
,DestinationFileName
, andDestinationExtension
take precedence (with an option to override). - Added a
Context
property for the currentIExecutionContext
to the available script properties (I.e., for use in metadata value scripts via "=>" notation).
- Added new
ProcessHtml
module for more flexible processing of DOM nodes. - Added new
IEnumerable<IDocument>.Flatten()
extension to flatten document trees. - Added new
IEnumerable<IDocument>.FilterSources()
andIEnumerable<IDocument>.FilterDestinations()
extension methods. - Added a new
FilterDestinations
module to filter documents by destination path. - Added a
Config.ContainsSettings(params string[] keys)
config factory to return whether the settings contain all the specified keys. - Refactored some methods from
IExecutionContext
intoIExecutionState
and moved implementation toEngine
. - Added new
EnumerateValues
module that will clone or create documents for each item in an enumeration. - Added
Keys.ExcludeFromEvaluation
that can exclude all or some metadata values from automatic script evaluation. - Added
IMetadata.GetNestedMetadata()
to get a nested metadata value (not calledIMetadata.GetMetadata()
to avoid conflicts with the old previous method of that name). - Renamed
IMetadata.GetMetadata()
toIMetadata.FilterMetadata()
which now returns aFilteredMetadata
instance. - Added new
FilteredMetadata
class to filter underlying metadata items by key(s). - Refactored a bunch of default interface implementations back to extension methods (turns out default interface implementations are a little awkward to maintain).
- Moved scripting support and the
CompileScript
andEvaluateScript
modules toStatiq.Core
. - Added
Microsoft.CodeAnalysis
toStatiq.Core
. - Metadata and configuration settings that are a string starting with "=>" are now considered "scripted" and the content to the right of the arrow will be lazily evaluated as C# code - this is a big deal and the use cases will become apparent over time (I have lots of big ideas around this feature).
- Removed the
InterpolateMetadata
module in favor of more robust built-in scripted metadata. - Removed the
Statiq.CodeAnalysis.IDocumentExtensions.Interpolate()
extension method in favor of more robust built-in scripted metadata. - Changed
CancellationTokenSource
uses inside the engine toCancellationToken
since the engine does not itself cancel execution. - Surfaced the
CancellationToken
for a given execution through theIExecutionState
. - Added a check to ensure the engine is only performing one execution at a time (the outer execution loop is not concurrently safe).
- Major refactoring involving engine and execution context interfaces, added a new
IExecutionState
interface that essentially represents a run-time engine. - Added a new
DocumentIdComparer
to compare documents by ID (#69, thanks @mholo65). - Removed
IParallelModule.WithSequentialExecution()
and standardized on.WithParallelExecution(false)
instead to make default behavior of running in parallel clearer (I.e., you have to turn it off). - Added additional configuration methods to
CacheDocuments
providing more control over when to invalidate cached documents (#78). - Added
IReadOnlyPipeline
for runtime access to pipeline data without changing modules. - Added
IExecutionContext.Pipeline
to get the currently executing pipeline from the execution context. - Removed
IBootstrapper
and refactored to the one trueBootstrapper
. - Added a
BootstrapperFactory
available viaBootstrapper.Factory
to create bootstrappers (this will make specialized creation extensions easier to discover).
- Changing target for all projects to .NET Core 3.1 LTS.
- New
Eval
shortcode (#37, #68, thanks @ProH4Ck). - Fixes the
CacheDocuments
module and excludesIDocument.Id
from hash calculation (#74, thanks @mholo65).
- Fixes a bug with
MirrorResources
and relative links (#72, thanks @dafergu2). - The
PhaseOutputs
collection now returns output documents from the most recent available phase or an empty result set if no phases were defined. - Adds .wasm as a supported media type (required for WebAssembly streaming).
- Fixes a bug with parallel modules when they return a null enumerable.
- Adds
AnalyzeCSharp.WithCompilationAssemblyName()
to set the name of the module compilation (#71). - Adds a metadata key "Compilation" to
AnalyzeCSharp
output documents to get the RoslynCompilation
from the module (#71). - Adds
IConfig.EnsureNonNull()
andIConfig.EnsureNonDocument()
extensions to simplify config parameter checks. - Refactors many of the configuration methods in
AnalyzeCSharp
to take configs instead of atomic values. - Ensures namespace documents from
AnalyzeCSharp
contain the "ContainingAssembly" metadata (#70). - Build script support for non-Windows platforms via a new
build.sh
(#65, thanks @khalidabuhakmeh). - Adds a
Config<TValue>.MakeEnumerable()
extension to transform a config into an enumerable value. - Adds a common
MultiConfigModuleBase
forMultiConfigModule
andParallelMultiConfigModule
. - Adds
CombineConfig
helper methods toMultiConfigModuleBase
to help with combining config values during configuration. - Refactors several of the
StartProcess
configuration methods to take configs.
- Split
DefaultFeatures.Commands
intoDefaultFeatures.BuildCommands
,DefaultFeatures.HostingCommands
, andDefaultFeatures.CustomCommands
for finer control. - Renamed
DefaultsToAdd
toDefaultFeatures
. - Adds a new
ThrowException
module that can be used to throw exceptions based on a config value. - Renames
BuildCommand
toPipelinesCommand
. - Refactors default commands by renaming
build
topipelines
and accepting pipelines to execute as an argument (moving the root path to an option). - Added
IBootstrapper.AddCommands<TParent>()
to add all nested class commands of a parent type. - Added
IBootstrapper.AddPipelines<TParent>()
to add all nested class pipelines of a parent type. - Added
Bootstrapper.CreateDefaultWithout()
andIBootstrapper.AddDefaultsWithout()
to create a default bootstrapper without specific components. - Renamed
IBootstrapper.AddBuildCommand()
methods toIBootstrapper.AddPipelineCommand()
.
- Added
StartProcess.WithArgument()
methods to add arguments to the module using a fluent interface. - Added
Config<TValue>.CombineWith()
extensions for combining two configs. - Added
Config<TValue>.Transform()
extensions for transforming from one value to another. - Made
IExecutionContext
(re)implementIMetadata
throughSettings
. - Added
ToString()
overloads toIFileSystemEntry
(can't believe those weren't already there). - Added a
Statiq.Netlify
extension with aDeployNetlifySite
module. IDocument
now implementsIContentProviderFactory
.- Added some additional
IContentProvider
overloads to theDeployAppService
module.
- Updated several low-risk package versions.
- Adds option names to all command option values (#64, thanks @patriksvensson).
- New
serve
command for serving arbitrary folders with a local preview server (#55, #60, thanks @duracellko). - Fix for regression when there are dependencies on pipelines that aren't executing.
- Small -- prefix in console/logs to help indicate when a pipeline phase is finished.
- Set longer timeouts for App Service uploads.
- Added support for uploading a zip file to Azure App Service (useful for artifact-based release processes).
- Fixes a bug in dependency ordering where deployment pipeline output phases were being run too early.
- Added
SetMediaType
module to set the media type without changing the content. - Changed the semantics of
IDocument.ContentProvider
so that it's never null. - Added
IContentProvider.Length
to get the content length without needing to get the stream. - Renamed
AddMetadata
toSetMetadata
to better match other module naming conventions and to reflect the metadata key being set might already exist. - Renamed
ReplaceContent
toSetContent
to better match other module naming conventions. - Removed the pre/post render flag from
ProcessShortcodes
and uses a default delimiter of<?# ... ?>
(the forthcoming site generator will need to define the alternate delimiter for pre-transform shortcodes directly). - Added overloads of methods that create content providers to set the media type.
- Updated all built-in modules to set the media type whenever appropriate.
- Added
IContentProvider.MediaType
to surface the media type of content. - Added a
MediaTypes
static class that contains an exhaustive set of media type (MIME) mappings by file extension. - Added a
DeploySearchIndex
module that deploys an Azure search index from input document metadata. - Added a
deploy
command that executes deployment pipelines. - Added a new
ExecutionPolicy.Normal
policy and changedExecutionPolicy.Default
to specify different behavior depending on if the pipeline is a deployment pipeline.
- The string overload of
SetDestination
now takes either an extension or a path distinguished by a preceding dot. - Updated Statiq.Razor to 3.0 libraries.
- Updated Statiq.Hosting to 3.0 libraries.
- Fixes
ExecuteIf
to work when there are no input documents and the config doesn't require one. - Fixes bug calculating command name for generic command types.
- Refactors
CreateDocuments
and adds additional config-based overloads.
- Changed
IBoostrapper.ConfigureSettings()
to use a newIConfigurationSettings
object that exposes the settings and the underlyingIConfiguration
- Renamed the execution-time
IConfigurationSettings
toIReadOnlyConfigurationSettings
and introduced a new mutableIConfigurationSettings
to use in the bootstrapper. - Several bug fixes related to settings and configuration.
- Changed
IBootstrapper.AddSettings()
calls to run after other configuration. - Adds a single pattern overload to
ReadFiles
. - Some refactoring of the base
Pipeline
class (most importantly to remove theDependencies
setter in favor of adding to the existing hash set). - Adds
IReadOnlyApplicationState.IsCommand()
to determine the current command.
- Added extensions for CLI
IConfigurator
to allow more flexible direct configuration (such as command branches). - Removed configuration/settings debug output on startup as it could leak secrets via environment variables or other configuration providers.
- Fix for
GenerateJson
so it executes when no input documents are provided. - Fix for preview command when no output is generated and the output directory does not exist.
- Fix for clearing content with empty string in
ReplaceContent
. - Renamed
EngineSettings
toConfigurationSettings
to reflect a broader use than just the engine.
- Added
IBootstrapper.AddDelegateCommand()
fluent methods to configure delegate-based commands. - Added
IBootstrapper.AddBuildCommand()
fluent methods to configure simple commands that build specified pipelines. - Refactored the base commands to allow consumers to derive from
EngineCommand
. - Added a new
IEngineManager
interface to expose the engine manager to commands that derive fromEngineCommand
. - Refactored
IEngine.Settings
andIExecutionContext.Settings
to use aIConfiguration
as the backing store and present it as metadata. - Lazily creates type-based pipelines using the DI container so they can have injected services (#59).
- Adds
INamedPipeline
to allow pipeline instances to provide names. - Changes
Module.AfterExecution()
andModule.AfterExecutionAsync()
to pass a newExecutionOutputs
class instead of by ref (which doesn't work with async). - Some tweaks to the
MirrorResources
retry policy.
- Adds
==
overloads toNormalizedPath
. - Adds a special
RenderSection()
toStatiqRazorPage
that renders default content if the section is not defined. - Renamed
IDocument.GetStream()
toIDocument.GetContentStream()
. - Renamed
IDocument.GetStringAsync()
toIDocument.GetContentStringAsync()
. - Renamed
IDocument.GetBytesAsync()
toIDocument.GetContentBytesAsync()
. - Added
IEngine.SerialExecution
and--serial
CLI argument to run pipelines and modules in serial (#58).
- Adds support for deployment pipelines (
IPipeline.Deployment
) which run their output phase only after other output phases (#57). - Fixes a bug when specifying a setting on the CLI and the bootstrapper.
- Adds
StartProcess.WithErrorExitCode()
to define a custom function for determining if the process existed in error. - Adds new
-d
/--defaults
and a flag to the engine to indicate if default pipelines should be run independent of specified pipelines. - Renames
SimpleBuildCommand
toCustomBuildCommand
and adds support for the default pipelines flag.
- Adds back a
ExecuteModules
module that works like the oldBranch
module used to by dropping any output documents from the child modules. - Tweaks to the placeholder factory in
CreateTree
. - Fix for the JavaScript engine getting reset on execution.
- No longer strips "Pipeline" from the end of pipeline classes for the pipeline name since
nameof
is often used to refer to pipelines.
- Adds
StartProcess.KeepContent()
to prevent replacing document content with process output. - Adds
StartProcess.OnlyOnce()
to only execute the process once. - Renamed
PipelineTrigger
toExecutionPolicy
. - Adds type-based methods for adding pipelines.
- All
IPipeline
implementations from the entry assembly are added by the bootstrapper by default. - All
ICommand
implementations from the entry assembly are added by the bootstrapper by default. - Adds ability to specify which defaults to add to the bootstrapper.
- Made
EngineManager
public so it can be used by custom commands. - Adds a new
SimpleBuildCommand
base command to make creating new pipeline-specific build commands easier. - Adds
AddPipelines()
andAddCommands()
methods to add pipelines and commands from the entry or a given assembly. - Adds
MultiConfigModule
,ParallelMultiConfigModule
,SyncMultiConfigModule
, andParallelSyncMultiConfigModule
base classes for modules that use multipleConfig<T>
values. - Adds
ExecutionPipeline
base pipeline for use when a custom pipeline that runs code for each phase is needed. - Adds new
ZipDirectory
module. - Renames the
Statiq.AmazonWebServices
extension library toStatiq.Aws
. - Adds
Statiq.Azure
extension library. - Adds new
DeployAppService
module.
- Updated to .NET Core 3.0 final.
- Isolated pipelines can now be dependencies of other pipelines (but output documents still can't be accessed).
- Renames delegate-based
IBootstrapper.AddSettings()
overload toIBoostrapper.ConfigureSettings()
. - Renames
IBootstrapper.AddServices()
toIBoostrapper.ConfigureServices()
. - Adds
IBootstrapper.ConfigureEngine()
. - Adds a
StartProcess
module to start a process and create a document from it's output or run it in the background. - The bootstrapper now adds environment variables to the settings by default with ALL_CAPS keys.
- Any setting with an ALL_CAPS key is masked during debug output on startup.
- Ongoing console logging improvements.
- Added trigger conditions to pipelines to include always running or manually running.
- Added a
-p
/--pipeline
CLI argument to indicate which pipelines to execute.
- New execution summary table logged after execution.
- New console logger with better output.
- More refactoring of base
Module
before/after methods.
- Renamed the GitHub project/repo to "Statiq.Framework" to match forthcoming "Statiq.Web" and to distinguish between primary code repos (prefixed by "Statiq.") and themes, etc. Also note the upcoming Statiq app will be known as Statiq Web from now on (as opposed to Statiq Framework).
- The engine now returns a
IPipelineOutputs
with the result documents from each pipeline. - Adds global events
BeforeModuleExecution
andAfterModuleExecution
with ability to override outputs. - Adds a new global event mechanism via
IEventCollection
,IReadOnlyEventCollection
,IEngine.Events
, andIExecutionContext.Events
. - Refactored the base module classes to include a before/after execution method, made the execution methods
protected
, and renamed the execution methods for clarity. - Added property setters with null checks to
Pipeline
so it works better as a base class and you can define the phase modules directly as properties. - Cleaned up
ModuleList
methods to remove overload ambiguity betweenparams IModule[]
andIEnumerable<IModule>
. - Added an implicit operator from
IModule[]
toModuleList
. - Raw application arguments as well as application input are now surfaced through a new
IReadOnlyApplicationState
object in theIExecutionContext
, taking the place of theApplicationInput
property. - Adds a bunch of
Config.FromSettings()
methods that get values from aIReadOnlySettings
. - "Pipeline" is now trimmed from the end of type names when types are added as a pipeline to a pipeline collection.
- Statiq Framework is comprehensive "reboot" of Wyam.