Statiq.Framework

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

MIT License

Stars
425

Bot releases are hidden (Show)

Statiq.Framework - 1.0.0-beta.52

Published by daveaglick almost 3 years ago

  • Made it easier to override certain interfaces used by the engine by registering alternate implementations in the service collection passed to the engine. Alternate implementations of the following can now be provided: IApplicationState, IMemoryStreamFactory, ILinkGenerator, INamespacesCollection, IScriptHelper, IDocumentFactory, and IFileCleaner. In addition, the default implementations of these interfaces have been refactored to make deriving from them easier (I.e. marked interface members as virtual).
  • Refactored the default LinkGenerator to use strings instead of NormalizedPath which could result in poor results in some edge cases like trailing slashes (#218).
  • Added toggle for keeping trailing slash when hiding a page in LinkGenerator and related extensions, also exposed via a new Keys.LinkHiddenPageTrailingSlash setting (#218).
  • Updated Spectre.Console reference in Statiq.App to 0.43.0.
Statiq.Framework - 1.0.0-beta.51

Published by daveaglick almost 3 years ago

  • Fixed a bug with backwards compatability of the HtmlKeys file not being in the original namespace (#973).
Statiq.Framework - 1.0.0-beta.50

Published by daveaglick almost 3 years ago

  • Breaking change: Removed Statiq.Html extension and moved all functionality into either Statiq.Common (helpers and utilities) or Statiq.Core (modules). All modules are still available through Statiq.Core and you should remove references to Statiq.Html.
  • Added a reference to AngleSharp in Statiq.Common.
  • Added all keys from HtmlKeys to Keys in Statiq.Common but kept HtmlKeys and marked it obsolete for backwards-compatibility.
  • Changed the behavior of HTML parsing and formatting (I.e. both reading and writing) to preserve any originally encoded character references (#213).
  • Added a new IExecutionContext.GetContentProvider() extension that accepts an AngleSharp IMarkupFormattable (such as IHtmlDocument).
  • Added WithAutoHighlightUnspecifiedLanguage() to the HighlightCode module to avoid time-consuming generation-time code highlighting when the language is unknown (#210, thanks @Turnerj).
  • Changed the HighlightShortcode module to add a <pre> element when there are new lines in the content or when specified using a new AddPre shortcode argument (#215).
Statiq.Framework - 1.0.0-beta.49

Published by daveaglick about 3 years ago

  • Breaking change: The LinkGenerator class is no longer static and now needs to be accessed through a new IExecutionState.LinkGenerator or IExecutionContext.LinkGenerator property.
  • Added the cache directory to the excluded list in Statiq.App.props.
  • Fixed a bug with DocumentFileProvider and documents with a null Destination.
  • Fixed a bug in the Razor engine when run under .NET 6 RC runtimes (#204, thanks @phil-scott-78).
  • Updated several dependencies (#199, #201, #202, thanks @devlead).
  • Added the ability to cache Razor partials using new CachedPartial() and CachedPartialAsync() HTML helpers. (#205)
Statiq.Framework - 1.0.0-beta.48

Published by daveaglick about 3 years ago

  • Added GenerateLunrIndex.WithClientName method to allow setting the name of the client object in the generated JavaScript file.
  • Fixed a bug in GenerateLunrIndex when no documents contain a given search field.
  • Added GenerateLunrIndex.WithStemming methods to control stemming behavior and changed default to no stemming.
  • Added support for typeahead style searching to the generated client JavaScript search file by default (I.e. automatically adds trailing wildcards).
Statiq.Framework - 1.0.0-beta.47

Published by daveaglick over 3 years ago

  • Breaking change: Renamed the erroneous Statiq.SearchIndex namespace in the Statiq.Lunr package to Statiq.Lunr.
  • Breaking change: Completely rewrote the GenerateLunrIndex module to build and output a search index at generation time and add a bunch of new features (#192).
  • Fixed a bug with the reflected namespace collection when dealing with objects in the global namespace (#191).
  • Fixed a bug when getting outputs from a valid pipeline that didn't produce any (it now returns an empty collection instead of throwing and exception) (#172).
  • Fixed a bug in the GenerateSiteMap module when using the LinkRoot setting that included the link root twice (#158, #193, thanks @kkato233).
  • Added support for named strongly-typed pipelines (#173).
Statiq.Framework - 1.0.0-beta.46

Published by daveaglick over 3 years ago

  • Fixed a bug in MirrorResources to prevent it from mirroring links with "rel" values that don't specify artifacts (#190).
  • Fixed a bug in MirrorResources to prevent it from mirroring resources from the current host when Host is specified (#190).
  • Added a ReadExcel module to Statiq.Tables that can read an Excel file into metadata as a IReadOnlyList<IReadOnlyList<string>>.
  • Added a ReadCsv module to Statiq.Tables that can read a CSV file into metadata as a IReadOnlyList<IReadOnlyList<string>>.
Statiq.Framework - 1.0.0-beta.45

Published by daveaglick over 3 years ago

  • Fixed several bugs related to caching in the CopyFiles module (#189).
Statiq.Framework - 1.0.0-beta.44

Published by daveaglick over 3 years ago

  • Breaking change: Fixed a bug with Razor layouts and partials and explicit model types. Previously all layouts and partials were assuming
    the model type was an IDocument. This meant that extension methods and other IDocument oriented functionality worked in a layout or partial
    when using the @Model property to access the document, but it also meant they didn't work for alternate models. Layouts and partials are
    supposed to generally handle all model types (since different views can call them), so now the model is dynamic for layouts and partials
    unless explicitly specified. This has the side-effect of making some @Model access like IDocument extension methods that used to work fail.
    If you see "does not contain a definition" error messages in Razor compilation, try changing @Model property access to @Document in your layouts
    and partials, or using an explicit @model directive at the top of the layout pr partial file to explicitly specify the model type for that layout or partial.
  • Fixed a bug when changing the CleanMode setting via the bootstrapper.
  • Improved compilation failure exception messages for Razor layouts and partials.
Statiq.Framework - 1.0.0-beta.43

Published by daveaglick over 3 years ago

  • Fixed a bug with using statements not being added to Razor layouts and partials (#953).
Statiq.Framework - 1.0.0-beta.42

Published by daveaglick over 3 years ago

  • Breaking change: Deleted IFile.GetCacheHashCodeAsync() and replaced it with an implementation of ICacheCode.
  • Breaking change: Renamed IContentProvider.GetCacheHashCodeAsync() and replaced it with an implementation of ICacheCode.
  • Breaking change: Renamed IDocument.GetCacheHashCodeAsync() and replaced it with an implementation of ICacheCode.
  • Added a new "cache" folder that contains caching artifacts to improve performance, deleting it won't harm anything but it should be left if possible to improve initial generation performance.
    Also note that the "cache" folder likely shouldn't be committed to a repository, though it's designed to support that scenario when warranted (I.e. relative paths, etc.).
  • Compiled Razor assemblies (including layouts and partials) are now cached to disk which dramatically improved initial generation performance by not recompiling files that haven't changed.
  • Added IFile.ReadAllBytesAsync() and IFile.WriteAllBytesAsync().
  • Added IFile.WriteFromAsync(), IFile.AppendFromAsync(), and IFile.CopyToAsync() extension methods to more easily copy a file from/to a stream.
  • Added IReadOnlyFileSystem.CachePath and related extensions, methods, etc. to provide a path where cache files should be stored and set to "cache" by default (which should be excluded in .gitignore).
  • The write tracking data is now cached in a file so if the output folder has not changed and the content is the same, files don't need to be written even on the first execution.
  • Added an ICacheCode interface to provide a standard deterministic .GetCacheCodeAsync() method and implemented it in IDocument, IContentProvider, and IFile.
  • Changed the console output encoding and the ProcessLauncher child process console encodings to UTF-8 so emoji and other Unicode characters will render correctly from child processes.
  • Fixed a bug with the --help CLI option and command description escaping (#186).
  • Added ability to set the temp and cache paths via the CLI.
Statiq.Framework - 1.0.0-beta.41

Published by daveaglick over 3 years ago

  • Added support for the PATH and PATHEXT environment variables to the ProcessLauncher so it can resolve file names more like cmd.exe.
  • Added better error messages when process launching fails.
  • Added CleanMode.Unwritten that will wait to clean the output folder after each execution and tries to avoid writing duplicate files to the file system (this is the new default).
  • Added IFile.GetCacheHashCodeAsync() which can be used to get a hash code representing the current state of a file.
  • Refactored FileContent.GetCacheHashCodeAsync() to use the new IFile.GetCacheHashCodeAsync() instead of attempting to read the entire file content.
Statiq.Framework - 1.0.0-beta.40

Published by daveaglick over 3 years ago

  • Several optimizations to file IO and the WriteFiles and CopyFiles modules.
Statiq.Framework - 1.0.0-beta.39

Published by daveaglick over 3 years ago

  • Fixed a bug with link generation for non http/https links in Markdown (#179, #184, thanks @JoshClose).
  • Fixed a bug with the ConsoleListener on MacOS that prevented signaling from the main thread (used for the preview command in Statiq Web) (#182, #183, thanks @devlead).
  • Fixed a bug with the CLI --help output that caused the app to crash (#180, #181, thanks @matkoch).
  • Added caching for IEnumerable<TDocument>.GetDestinationTree() and IEnumerable<TDocument>.GetSourceTree() which results in a significant performance improvement in some cases for large sites.
  • Improved logging messages related to timing.
  • Added IFile extensions to serialize and deserialize JSON.
  • Added IFile extensions to serialize and deserialize YAML.
  • Added NormalizedPath.ThrowIfRealtive() and NormalizedPath.ThrowIfAbsolute() helper methods.
  • Added a IDirectory.MoveTo() method.
  • Fixed a bug that caused an input phase overload of an ExecutionPipeline not to execute.
Statiq.Framework - 1.0.0-beta.38

Published by daveaglick over 3 years ago

  • Fixed a bug when both a debugger was attached and the log level was set to debug by removing the DebugLogger (#176).
  • Added a RedirectTo metadata value to documents output from GenerateRedirects.
  • Fixed a regression with the DocumentLink() HTML helper in Razor (#177).
Statiq.Framework - 1.0.0-beta.37

Published by daveaglick over 3 years ago

  • Updated Buildalyzer to the most recent version and resolves Roslyn version incompatibilities in the AnalyzeCSharp module (#174, thanks @mholo65).
  • Added an optional makeAbsolute parameter to LinkGenerator.GetLink() that allows keeping links as relative (#170).
  • Fixed fragment support in the Markdown link rewriter (#170, #175, thanks @JoshClose).
  • Fixed LinkGenerator behavior when using query and/or fragment components (#170).
  • Added makeAbsolute parameters to IExecutionState.GetLink() extension methods and others as appropriate (#170).
Statiq.Framework - 1.0.0-beta.36

Published by daveaglick over 3 years ago

  • Removes the UrlResolutionTagHelper from Razor processing so that ~/ links don't get processed (#170).
  • Adds support for ~/ link resolution to Markdown files, note that this is an interim feature and will be removed again in favor of a new module that handles ~/ links for all template engines soon (#170, #171, thanks @JoshClose).
Statiq.Framework - 1.0.0-beta.35

Published by daveaglick over 3 years ago

  • Added better error logging of Razor rendering failures.
  • Changed the default Razor model type to IDocument from dynamic if no explicit model or base type is specified.
Statiq.Framework - 1.0.0-beta.33

Published by daveaglick over 3 years ago

  • Added ability to "map" input folders to subfolders in the virtual folder hierarchy (so not every input folder has to be at the root now).
  • Added the GenerateJson module back in (it got dropped a while ago when Statiq.Json was merged with Statiq.Core).
  • Added a utility LoggerFactoryLoggerWrapper class that can wrap the context (or any other ILogger) and provide it as an ILoggerFactory that always logs to the underlying logger.
  • Fixed a bug with the generated doctype element in redirects (#160, #161, thanks @gep13).
  • Fixed a bug with virtual input directories when getting a parent directory from a file produced by one (it wasn't getting the original virtual directory).
Statiq.Framework - 1.0.0-beta.32

Published by daveaglick almost 4 years ago

  • Breaking change: Refactored the IExecutionContext.GetContentProviderAsync(string) extension (and overloads) to be non-async and unified related extensions that get content providers.
  • Breaking change: Refactored IDocument.CloseAsync(string) and related extensions to be non-async and unified related clone methods into a single set of overloads.
  • Breaking change: Removed the UseStringContentFiles option because it's no longer relevant with the new string and stream processing.
  • Updated the Razor engine from 3.0.0 to 3.1.10.
  • Updated the Roslyn libraries from 3.4.0 to 3.8.0.
  • Changed the precedence of environment variables to overwrite configuration from settings files to match expected ASP.NET Core conventions (#154).
  • Fixed some bugs with the ProcessLauncher on Linux and Mac by ensuring the entire process tree is killed (#156).
  • Added some performance caching for IExecutionProcess.OutputPages.
  • Refactored NormalizedPath to reduce use of strings.
  • Added some performance enhancements to caching of AngleSharp HTML documents.