A flexible and extensible static content generation framework for .NET.
MIT License
Bot releases are hidden (Show)
Published by daveaglick almost 4 years ago
RedirectBody
key (#153)..fhtml
as a media type to mean HTML fragments (needed so that we can treat full HTML and HTML fragments differently when applying layouts in Statiq Web).Published by daveaglick almost 4 years ago
CleanMode
enumeration and corresponding setting to control which output files are cleaned on execution (#152).--clean-mode
command-line option to control the cleaning mode.CleanMode.Self
which only cleans files written during execution and not those written by external processes, for example.IServiceProvider
to the PipelineBuilder
so services are available when building pipelines (#150).IReadOnlyFileSystem.GetRootPath()
extensions.ProcessLauncher.WaitForRunningProcesses()
that allows waiting until all running processes have exited.IBootstrapper.Command
property that can get the command that was run (provided it inherits from BaseCommand<TSettings>
).Published by daveaglick almost 4 years ago
interactive
command that provides a REPL (read-eval-print prompt) after execution, useful for inspecting the state of the engine and debugging the generation.Published by daveaglick almost 4 years ago
.PreserveFrontMatter()
configuration method to the ExtractFrontMatter
module that preserves the front matter content.ViewData
in the RenderRazor
module (#145, #146, thanks @alanta).BeforeDeployment
event that gets raised before any deployment pipelines are run (or at the end of execution if there are no deployment pipelines).ProcessLauncher
utility class to Statiq.Common
that does what the StartProcess
module does, but in a way that can be used outside of the module since it's such a general use case.Published by daveaglick almost 4 years ago
Published by daveaglick almost 4 years ago
Published by daveaglick almost 4 years ago
Statiq.Html.ValidateLinks
module in favor of analyzers in Statiq Web (which have already been improved beyond the module).Statiq.Html
package and it should continue to work.Statiq.Images
to stable version 1.0.1 (thanks @JimBobSquarePants, #138).Published by daveaglick about 4 years ago
StartProcess.LogErrors()
to configure whether standard error output is logged as debug or error messages.IContentProvider.GetCacheHashCodeAsync()
to get and cache a hash code for a given content provider.RenderMarkdown.WithMarkdownDocumentKey(string markdownDocumentKey)
to indicate where the MarkdownDocument
should be saved, or not at all.DocumentAnalyzer
and SyncDocumentAnalyzer
in favor of combining into alternate overloads in Analyzer
and SyncAnalyzer
similar to how Module
handles itIInitializer
to IBootstrapperInitializer
.IEngineInitializer
which will be instantiated and called when an engine first starts up (for example, lets you hook engine events from extensions).BeforeEngineExecution
to Statiq.Common
so they can be subscribed by extensions using a IEngineInitializer
.IAnalyzer
methods, added IExecutionContext
as a base interface for IAnalyzerContext
, and analyzer documents now passed as IAnalyzerContext.Inputs
similar to modules.IAnalyzer.BeforeEngineExecutionAsync(IEngine engine, Guid executionId)
to get called one-per-instance for each analyzer prior to each engine execution (for resetting caches, etc.).KeyValuePair<string, Phase>
instead of distinct pipeline and phase arrays.Published by daveaglick about 4 years ago
Published by daveaglick about 4 years ago
ValidateLinks
module when using a <base>
element on the page.IExecutionState.LogBuildServerWarning()
and IExecutionState.LogBuildServerError()
extensions to log messages to the console in a format build servers can recognize for build checks (GitHub Actions and Azure Pipelines).StartProcess.HideArguments()
method to hide arguments when logging process commands.NormalizedPath.GetTitle()
when the file name contains multiple extensions (#130, #131, thanks @devlead).Analyzer
, SyncAnalyzer
, DocumentAnalyzer
, and SyncDocumentAnalyzer
base analyzer classes (#104).Bootstrapper.Analyze()
and Bootstrapper.AnalyzeDocument()
for defining delegate-based analyzers (#104).LogLevel.None
.--failure-log-level <LEVEL>
CLI command to fail generation and return a non-zero exit code if any log messages exceed the provided threshold (I.e. --failure-log-level Warning
) (#101).Bootstrapper.SetFailureLogLevel()
extension to set the failure log level from code (#101).RenderMarkdown
module now adds MarkdownDocument
metadata that contains the Markdig MarkdownDocument
created during processing.RenderScriban
module (#120, thanks @mholo65).ExecuteDestinations
and ExecuteSources
modules to filter documents by destination or source and then execute modules on the filtered documents.Published by daveaglick about 4 years ago
FilterSources
and FilterDestinations
modules that accept Config<IEnumerable<string>>
for the patterns.IDirectory.GetFiles()
and IDirectory.GetDirectories()
to make sure excluded paths are excluded from the results.ReadFiles
module without any patterns now returns all files.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).IMetadata.ToJson()
utility extensions to serialize an IMetadata
object to JSON.EvaluateScript
module would reset the document media type for content return values.glob eval
command to evaluate a globbing pattern against a specified directory and report all the matches.glob test
command to test a specified path against a globbing pattern to see if it matches.MirrorResource
(#127).ReadApi
module for generally reading from an API client (#126, thanks @unchase).IBootstrapper.ModifyPipeline()
to make it easier to modify an existing pipeline via the bootstrapper.ExecuteBranch
module.Published by daveaglick about 4 years ago
IDocument.GetParent()
, IDocument.HasChildren()
, IDocument.GetDescendants()
, and IDocument.GetDescendantsAndSelf()
extension methodsIDocument.GetChildren()
still remains since it's fetching actual metadata values). Instead, the appropriate tree concept can now be accessed via an implementationIDocumentTree<TDocument>
interface. This change may break navigation, so Outputs
or OutputPages
should be considered for generating navigation instead.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").Outputs.Get()
and OutputPages.Get()
to support getting a single document from those collections by destination path, which is faster than globbing.IDocumentTree<TDocument>
interface to encapsulate different kinds of document tree traversal logic.DocumentMetadataTree<TDocument>
implementation to represent document trees as the result of metadata containing child documents.DocumentPathTree<TDocument>
implementation to represent document trees as the result of file paths.IEnumerable<TDocument>.AsMetadataTree()
extension method to get a DocumentMetadataTree<TDocument>
instance that creates a tree from document metadata containing child documents.IEnumerable<TDocument>.AsDestinationTree()
extension method to get a DocumentPathTree<TDocument>
instance that creates a tree from document destination paths.IEnumerable<TDocument>.AsSourceTree()
extension method to get a DocumentPathTree<TDocument>
instance that creates a tree from document source paths.FilteredDocumentList<TDocument>
return type for IEnumerable<TDocument>.FilterDestinations()
and IEnumerable<TDocument>.FilterSources()
callsOutputs[string[] patterns]
) which implements the new IDocumentTree<TDocument>
and lets you treat the resulting filtered documents as a tree from the filter return.IDocumentTree<TDocument>
interface to IPipelineOutputs
with default implementations that operate on document destination paths. This means you can callOutputs.GetChildren(doc)
to get all the children across all pipelines of the given document, etc.IndexFileName
setting to control the default file name of index files (defaults to index.html
).PageFileExtensions
setting to control the default file extensions of "pages" for things like OutputPages
filtering and link generation (defaults to ".html" and ".htm").SetDestination
module that will change the destination of documents to the first value of the PageFileExtensions
setting (default of ".html").MinimumStatiqFrameworkVersion
key to perform a check for the minimum allowed version of Statiq Framework. If this is set to something higher than the current versionMinimumStatiqFrameworkVersion-MySite
).Published by daveaglick about 4 years ago
ValidateLinks
module (#119).Published by daveaglick about 4 years ago
IPipelineOutputs
indexer to filter documents by destination path from all pipelines instead of get documents from a specified pipeline.IPipelineOutputs.FromPipeline(string)
. This will make the more common case (finding a document or documents among all pipelines) easier.Outputs.FromPipeline()
.DocumentList<TDocument>
indexer to return all matching documents instead of the first matching document. To refactor your code.FirstOrDefault()
after the call to the indexer.CompileScript
module in favor of global script caching (so using the EvaluateScript
module will also cache the script compilation, removing the need for a separate cached assembly).IScriptHelper
to promote global script compilation caching.Get()
variants. For example, a scripted metadata value => Foo
should become => Get("Foo")
.AbsolutizeLinks
module to MakeLinksAbsolute
for clarity and to match with the new MakeLinksRootRelative
module.MakeLinksRootRelative
module.IEnumerable<IDocument>.ContainsById(IDocument)
extension method to determine if a sequence contains an equivalent document by ID.ConcurrentCache<TKey, TValue>
helper class that uses Lazy<T>
, which improves performance of internals by avoiding duplicate value factory evaluation.CacheDocuments
module and document hash code generation.IComparer<T>.ToConvertingComparer()
extension method that converts a typed comparer into a IComparer<object>
that performs type conversions.IEqualityComparer<T>.ToConvertingComparer()
extension method that converts a typed comparer into a IComparer<object>
that performs type conversions.RemoveTreePlaceholders
module to remove tree placeholder documents without flattening.MergeMetadata
and MergeDocuments
modules no longer merge settings (since they're inherited by the document regardless).IMetadata.WithoutSettings()
to return filtered metadata without any settings values.IMetadataValue.Get()
so that metadata values can use it if needed.IMetadataValue
metadata values (it will now throw an error so you know which key is recursively expanding).RenderSectionOrPartial(string sectionName, string partialName)
helper to the base Razor page.GenerateFeeds
.AddRtlSupport
module in Statiq.Html
that automatically adds RTL attributes to HTML elements (#113, #15, thanks @encrypt0r).IEnumerable<IDocument>.RemoveTreePlaceholders()
extension method.FlattenTree
module and the IEnumerable<IDocument>.Flatten()
extension methods.settings
as a default settings file name (with support for JSON, YAML, or XML formats).appsettings
and statiq
YAML (.yml
and .yaml
) and XML (.xml
) configuration files.AnalyzeCSharp
module (#116).Published by daveaglick over 4 years ago
RenderRazor.WithLayout()
take precedence over an available _ViewStart.cshtml
file (by ignoring the _ViewStart.cshtml
file entirely which previously took precedence in this case).Published by daveaglick over 4 years ago
NormalizedPath.ContainsDescendantOrSelf()
.NormalizedPath.ContainsChildOrSelf()
.NormalizedPath.GetRelativeOutputPath()
.IReadOnlyFileSystem.GetRelativeOutputPath()
extension.IReadOnlyFileSystem.GetRelativeInputPath()
extension.IFileSystem.ExcludedPaths
to indicate input paths that should be excluded from processing..GetInstance(Type)
and .GetInstance<TType>()
methods to the ClassCatalog
.GenerateRedirects
module for original files ending in .htm
(#105).Spectre.Cli
to version 0.35.0 with better internal command registration (#110, thanks @patriksvensson).IDocument
models in Razor (#108, #23, thanks @alanta).Published by daveaglick over 4 years ago
Statiq.App.props
file to a buildTransitive
folder in the package so it flows transitively to consumers.Published by daveaglick over 4 years ago
Config
delegates not indicating that they don't require a document.IReadOnlyPipelineCollection IExecutionState.ExecutingPipelines
property that provides the currently executing pipelines.ThrowExceptionIf
module that throws an exception if a condition is true.Config<bool>.IsFalse()
extension method.Config.ContainsAnySettings()
extension method.IReadOnlyDictionary<K, V>.ContainsAnyKeys()
extension methods.StartProcess
module.OrderDocuments
module sorting by string value for default keys.GatherHeadings
to take a Config<int>
for specifying the level.Published by daveaglick over 4 years ago
StreamContent
content provider in favor of the new MemoryContent
content provider (should also provide a nice performance boost since there's no more stream locking).IExecutionContext.GetContentProvider()
extensions that take a byte[]
buffer.MemoryContent
content provider that wraps a byte[]
buffer.IEngine.Settings
to be mutable, settings can now be added directly to the engine after instantiation.Published by daveaglick over 4 years ago
DocumentFileProvider
.IEnumerable<TDocument>.FilterSources()
and IEnumerable<TDocument>.FilterDestinations()
extensions.IReadOnlyDictionary<TKey, TValue>.ContainsKeys()
extension utility method.ExecuteIf
module.