Ociaw.StatiqMermaid 0.1.0-beta.1

This is a prerelease version of Ociaw.StatiqMermaid.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Ociaw.StatiqMermaid --version 0.1.0-beta.1
NuGet\Install-Package Ociaw.StatiqMermaid -Version 0.1.0-beta.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ociaw.StatiqMermaid" Version="0.1.0-beta.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Ociaw.StatiqMermaid --version 0.1.0-beta.1
#r "nuget: Ociaw.StatiqMermaid, 0.1.0-beta.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Ociaw.StatiqMermaid as a Cake Addin
#addin nuget:?package=Ociaw.StatiqMermaid&version=0.1.0-beta.1&prerelease

// Install Ociaw.StatiqMermaid as a Cake Tool
#tool nuget:?package=Ociaw.StatiqMermaid&version=0.1.0-beta.1&prerelease

StatiqMermaid

Provides Statiq modules and a pipeline to generate diagrams from code. Depends upon Mermaid CLI.

Modules added:

  • BuildMermaidDefinition - builds a mermaid definition from API pipeline results
  • RenderMermaidSvg - renders an SVG from mermaid definition (.mmd) documents
  • RenderMermaidSvgFromHtml - renders and embeds SVGs from HTML documents

The Mermaid Pipeline inserts itself to execute after the "API" pipeline, but before the "Content" pipeline. It pulls documents API that have the Kind of NamedType, then feeds them to BuildMermaidDefinition and RenderMermaidSvg, respectively, before writing the resulting SVGs to the file system.

Usage

Adding the pipeline:

using Ociaw.StatiqMermaid;

await Bootstrapper.Factory
    .CreateDocs(args)
    .AddSourceFiles(sourceGlob)
    .AddPipeline("Mermaid", settings =>
    {
        var executable = settings.GetString("MermaidExecutable");
        return executable is null ? new Mermaid() : new Mermaid(executable);
    })
    .RunAsync();

The pipeline assumes that the Mermaid CLI executable is mmdc - if that is not the case, pass in a custom executable path.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.1.0-beta.2 121 3/5/2023
0.1.0-beta.1 110 12/24/2022

Initial release