BoxOfYellow.ConsoleMarkdownRenderer.Spectre 0.12.1

dotnet add package BoxOfYellow.ConsoleMarkdownRenderer.Spectre --version 0.12.1
                    
NuGet\Install-Package BoxOfYellow.ConsoleMarkdownRenderer.Spectre -Version 0.12.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="BoxOfYellow.ConsoleMarkdownRenderer.Spectre" Version="0.12.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BoxOfYellow.ConsoleMarkdownRenderer.Spectre" Version="0.12.1" />
                    
Directory.Packages.props
<PackageReference Include="BoxOfYellow.ConsoleMarkdownRenderer.Spectre" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BoxOfYellow.ConsoleMarkdownRenderer.Spectre --version 0.12.1
                    
#r "nuget: BoxOfYellow.ConsoleMarkdownRenderer.Spectre, 0.12.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.
#:package BoxOfYellow.ConsoleMarkdownRenderer.Spectre@0.12.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BoxOfYellow.ConsoleMarkdownRenderer.Spectre&version=0.12.1
                    
Install as a Cake Addin
#tool nuget:?package=BoxOfYellow.ConsoleMarkdownRenderer.Spectre&version=0.12.1
                    
Install as a Cake Tool

BoxOfYellow.ConsoleMarkdownRenderer.Spectre

nuget

Low-level markdown text → Spectre.Console IRenderable package.

For consumers who are already building their own Spectre.Console document and want to splice rendered markdown into it — without the interactive prompt loop or HTTP downloading of the main BoxOfYellow.ConsoleMarkdownRenderer package.

See the main README for the full project overview.


Quick start

using BoxOfYellow.ConsoleMarkdownRenderer.Spectre;

var md = new SpectreMarkdownRenderer(new SpectreDisplayOptions
{
    CodeBlock = new Style(Color.Grey85, Color.Grey15),
    TableBorder = TableBorder.Rounded,
});

var result = md.Render(File.ReadAllText("notes.md"));

// Splice into your own document
var grid = new Grid().AddColumn().AddColumn();
grid.AddRow(new Panel("Sidebar"), result.Root ?? Text.Empty);
AnsiConsole.Write(grid);

// Process extracted links however you like
foreach (var link in result.Links)
{
    AnsiConsole.MarkupLine($"[blue]{link.Url}[/]");
}

Key types

Type Description
SpectreMarkdownRenderer Entry point. Render(string) returns a fresh MarkdownRenderResult per call.
MarkdownRenderResult Root (IRenderable?), Links, UnhandledTypes, UnknownEmphasisDelimiters.
SpectreDisplayOptions All style properties use Spectre.Console types directly (Style, TableBorder, etc.). Supports JSON serialization.
ISpectreHeaderStyle Interface for heading styles; three built-in implementations below.
SpectreFigletHeaderStyle Renders headings as large ASCII art via Spectre.Console FigletText.
SpectreRuleHeaderStyle Renders headings as a titled horizontal rule (e.g. ──── Overview ────).
SpectreStyleHeaderStyle Renders headings as inline styled markup.
LinkItem A hyperlink found during rendering: Url, Content, IsImage.
UnknownEmphasisDelimiter An emphasis delimiter that fell into the catch-all rendering branch.

The types within the Support namespace are not intended for public consumption. They are used internally to implement the rendering logic and may change without notice. If you find yourself needing to use them, please open an issue and we can discuss whether they should be promoted to public API.


Relationship to the main package

BoxOfYellow.ConsoleMarkdownRenderer depends on this package and layers the interactive prompt loop, HTTP downloading, image inlining, and on top of it.

If you need the full experience (follow links, display images, etc.), use the main package. If you only need to render markdown to an IRenderable, use this package directly.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on BoxOfYellow.ConsoleMarkdownRenderer.Spectre:

Package Downloads
BoxOfYellow.ConsoleMarkdownRenderer

This library enables displaying markdown within console applications See https://github.com/boxofyellow/ConsoleMarkdownRenderer/blob/main/README.md

BoxOfYellow.ConsoleMarkdownRenderer.Fakes

Test fakes for ConsoleMarkdownRenderer, enabling dependency injection and unit testing. See https://github.com/boxofyellow/ConsoleMarkdownRenderer/blob/main/ConsoleMarkdownRenderer.Fakes/README.md

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.12.1 122 6/27/2026