Statiq.Framework

A flexible and extensible static content generation framework for .NET.

MIT License

Stars
425

Bot releases are visible (Hide)

Statiq.Framework - 1.0.0-beta.31

Published by daveaglick almost 4 years ago

  • Added some additional retry policies to file operations to avoid file lock exceptions under certain conditions (#151).
  • Added ability to customize the body of meta-refresh redirect HTML files using the RedirectBody key (#153).
  • Added .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).
Statiq.Framework - 1.0.0-beta.30

Published by daveaglick almost 4 years ago

  • Added a new CleanMode enumeration and corresponding setting to control which output files are cleaned on execution (#152).
  • Added a --clean-mode command-line option to control the cleaning mode.
  • Changed the default cleaning behavior to CleanMode.Self which only cleans files written during execution and not those written by external processes, for example.
  • Added the IServiceProvider to the PipelineBuilder so services are available when building pipelines (#150).
  • Added new IReadOnlyFileSystem.GetRootPath() extensions.
  • Added ProcessLauncher.WaitForRunningProcesses() that allows waiting until all running processes have exited.
  • Added a IBootstrapper.Command property that can get the command that was run (provided it inherits from BaseCommand<TSettings>).
Statiq.Framework - 1.0.0-beta.29

Published by daveaglick almost 4 years ago

  • Added a new interactive command that provides a REPL (read-eval-print prompt) after execution, useful for inspecting the state of the engine and debugging the generation.
Statiq.Framework - 1.0.0-beta.28

Published by daveaglick almost 4 years ago

  • Added a .PreserveFrontMatter() configuration method to the ExtractFrontMatter module that preserves the front matter content.
  • Fixed a bug with gathered headings where HTML was included in the heading text (#142).
  • Added support for specifying ViewData in the RenderRazor module (#145, #146, thanks @alanta).
  • Added a new BeforeDeployment event that gets raised before any deployment pipelines are run (or at the end of execution if there are no deployment pipelines).
  • Added a new 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.
Statiq.Framework - 1.0.0-beta.27

Published by daveaglick almost 4 years ago

  • Fixed a bug with deployment pipelines getting document outputs from non-deployment pipelines.
  • Fixed a bug where deployment pipeline input phases were starting with outputs from non-deployment pipelines (input phases should always start empty).
  • Improved exception logging when in a module to include pipeline, phase, and module name.
Statiq.Framework - 1.0.0-beta.26

Published by daveaglick almost 4 years ago

  • Fixed an unnecessary pipeline dependency check for deployment pipelines that prevented setting up dependency chains involving deployment pipelines and only dependent non-deployment pipelines.
Statiq.Framework - 1.0.0-beta.25

Published by daveaglick almost 4 years ago

  • Breaking change: Removed the Statiq.Html.ValidateLinks module in favor of analyzers in Statiq Web (which have already been improved beyond the module).
    If you still need access to this module directly, copy the code from a previous version into your own project and reference the Statiq.Html package and it should continue to work.
  • Updated ImageSharp in Statiq.Images to stable version 1.0.1 (thanks @JimBobSquarePants, #138).
  • Improved logging, all error and warning messages are now output on Azure Pipelines and GitHub Actions as checks.
Statiq.Framework - 1.0.0-beta.24

Published by daveaglick about 4 years ago

  • Added StartProcess.LogErrors() to configure whether standard error output is logged as debug or error messages.
  • Added IContentProvider.GetCacheHashCodeAsync() to get and cache a hash code for a given content provider.
  • Updated AngleSharp to 0.14.0 (#135, #136, thanks @alanta).
  • Added RenderMarkdown.WithMarkdownDocumentKey(string markdownDocumentKey) to indicate where the MarkdownDocument should be saved, or not at all.
  • Removed DocumentAnalyzer and SyncDocumentAnalyzer in favor of combining into alternate overloads in Analyzer and SyncAnalyzer similar to how Module handles it
    (this lets analyzers provide functionality before documents are processed individually).
  • Renamed IInitializer to IBootstrapperInitializer.
  • Added IEngineInitializer which will be instantiated and called when an engine first starts up (for example, lets you hook engine events from extensions).
  • Moved engine event classes like BeforeEngineExecution to Statiq.Common so they can be subscribed by extensions using a IEngineInitializer.
  • Removed documents from the IAnalyzer methods, added IExecutionContext as a base interface for IAnalyzerContext, and analyzer documents now passed as IAnalyzerContext.Inputs similar to modules.
  • Added IAnalyzer.BeforeEngineExecutionAsync(IEngine engine, Guid executionId) to get called one-per-instance for each analyzer prior to each engine execution (for resetting caches, etc.).
  • Changed analyzer pipeline and phase specification to be a collection of KeyValuePair<string, Phase> instead of distinct pipeline and phase arrays.
  • Changed deployment pipelines so that none of their phases are executed until all phases of non-deployment pipelines are completed (I.e. deployment pipelines now don't start executing until all non-deployment pipelines are done).
  • Non-deployment pipelines can no longer have a dependency on deployment pipelines (this didn't really make sense before, but now it's enforced).
Statiq.Framework - 1.0.0-beta.23

Published by daveaglick about 4 years ago

  • Removed a debugging break statement that snuck into the last release.
Statiq.Framework - 1.0.0-beta.22

Published by daveaglick about 4 years ago

  • Fixed a bug with the ValidateLinks module when using a <base> element on the page.
  • Added 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).
  • Fixed bugs with relative link validation (#128, #134, thanks @mholo65).
  • Added a StartProcess.HideArguments() method to hide arguments when logging process commands.
  • Fixed several bugs related to cancellation and error codes.
  • Fixed a bug with NormalizedPath.GetTitle() when the file name contains multiple extensions (#130, #131, thanks @devlead).
  • Added support for analyzers (#104).
  • Added Analyzer, SyncAnalyzer, DocumentAnalyzer, and SyncDocumentAnalyzer base analyzer classes (#104).
  • Added Bootstrapper.Analyze() and Bootstrapper.AnalyzeDocument() for defining delegate-based analyzers (#104).
  • Fixed a bug in the console logger when logging with LogLevel.None.
  • Added a --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).
  • Added a Bootstrapper.SetFailureLogLevel() extension to set the failure log level from code (#101).
  • The RenderMarkdown module now adds MarkdownDocument metadata that contains the Markdig MarkdownDocument created during processing.
  • Added Scriban (Liquid) support via new RenderScriban module (#120, thanks @mholo65).
  • Added ExecuteDestinations and ExecuteSources modules to filter documents by destination or source and then execute modules on the filtered documents.
Statiq.Framework - 1.0.0-beta.21

Published by daveaglick about 4 years ago

  • Added some optimizations for async file I/O.
  • Added overloads to FilterSources and FilterDestinations modules that accept Config<IEnumerable<string>> for the patterns.
  • Fixed IDirectory.GetFiles() and IDirectory.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 an IMetadata 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.
Statiq.Framework - 1.0.0-beta.20

Published by daveaglick about 4 years ago

  • Breaking change: Removed the IDocument.GetParent(), IDocument.HasChildren(), IDocument.GetDescendants(), and IDocument.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 the IDocumentTree<TDocument> interface. This change may break navigation, so Outputs or OutputPages 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() and OutputPages.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 a DocumentMetadataTree<TDocument> instance that creates a tree from document metadata containing child documents.
  • Added a IEnumerable<TDocument>.AsDestinationTree() extension method to get a DocumentPathTree<TDocument> instance that creates a tree from document destination paths.
  • Added a IEnumerable<TDocument>.AsSourceTree() extension method to get a DocumentPathTree<TDocument> instance that creates a tree from document source paths.
  • Added a new FilteredDocumentList<TDocument> return type for IEnumerable<TDocument>.FilterDestinations() and IEnumerable<TDocument>.FilterSources() calls
    (including Outputs[string[] patterns]) which implements the new IDocumentTree<TDocument> and lets you treat the resulting filtered documents as a tree from the filter return.
  • Added the IDocumentTree<TDocument> interface to IPipelineOutputs with default implementations that operate on document destination paths. This means you can call
    methods like Outputs.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 to index.html).
  • Added a new PageFileExtensions setting to control the default file extensions of "pages" for things like OutputPages 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 the PageFileExtensions 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 example MinimumStatiqFrameworkVersion-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
Statiq.Framework - 1.0.0-beta.19

Published by daveaglick about 4 years ago

  • Lots of under-the-hood refactoring to make things faster.
  • Fix for invalid URIs in the ValidateLinks module (#119).
Statiq.Framework - 1.0.0-beta.18

Published by daveaglick about 4 years ago

  • 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 the EvaluateScript 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 to MakeLinksAbsolute for clarity and to match with the new MakeLinksRootRelative 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 uses Lazy<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 a IComparer<object> that performs type conversions.
  • Added a IEqualityComparer<T>.ToConvertingComparer() extension method that converts a typed comparer into a IComparer<object> that performs type conversions.
  • Added a RemoveTreePlaceholders module to remove tree placeholder documents without flattening.
  • The MergeMetadata and MergeDocuments 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 in Statiq.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 the IEnumerable<IDocument>.Flatten() extension methods.
  • Added settings as a default settings file name (with support for JSON, YAML, or XML formats).
  • Added support for appsettings and statiq 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).
Statiq.Framework - 1.0.0-beta.17

Published by daveaglick over 4 years ago

  • 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).
Statiq.Framework - 1.0.0-beta.16

Published by daveaglick over 4 years ago

  • 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 the ClassCatalog.
  • 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).
Statiq.Framework - 1.0.0-beta.15

Published by daveaglick over 4 years ago

  • Added the new Statiq.App.props file to a buildTransitive folder in the package so it flows transitively to consumers.
Statiq.Framework - 1.0.0-beta.14

Published by daveaglick over 4 years ago

  • 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 a Config<int> for specifying the level.
Statiq.Framework - 1.0.0-beta.13

Published by daveaglick over 4 years ago

  • Removed the 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).
  • Added IExecutionContext.GetContentProvider() extensions that take a byte[] buffer.
  • Added new MemoryContent content provider that wraps a byte[] 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.
Statiq.Framework - 1.0.0-beta.12

Published by daveaglick over 4 years ago

  • Added document flattening by default when using the DocumentFileProvider.
  • Added document flattening by default when using IEnumerable<TDocument>.FilterSources() and IEnumerable<TDocument>.FilterDestinations() extensions.
  • Added a IReadOnlyDictionary<TKey, TValue>.ContainsKeys() extension utility method.
  • Added multiple key test to the ExecuteIf module.