Getting Started
Documentation menu
This guide adds Markdig and FlexiBlocks to a small application, builds a pipeline and renders a document with a FlexiSectionBlock.
Install
dotnet add package Markdig
dotnet add package Jering.Markdig.Extensions.FlexiBlocks
Build a pipeline
Create a MarkdownPipelineBuilder and add the FlexiBlocks extensions you need. The example below enables the section extension.
var pipeline = new MarkdownPipelineBuilder()
.UseFlexiBlocks()
.Build();
Render Markdown
var markdown = "s{ A section title }
The content of the section.";
var html = Markdown.ToHtml(markdown, pipeline);
Explore the extensions
Each block has its own syntax and options. Browse the extension index to choose the blocks that fit your document model.
Next
Read Structurally Redundant Markup to keep the source readable for writers who do not use the renderer.