MarkdigExtensions.Bootstrap.Admonitions 0.3.0

dotnet add package MarkdigExtensions.Bootstrap.Admonitions --version 0.3.0
NuGet\Install-Package MarkdigExtensions.Bootstrap.Admonitions -Version 0.3.0
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="MarkdigExtensions.Bootstrap.Admonitions" Version="0.3.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MarkdigExtensions.Bootstrap.Admonitions --version 0.3.0
#r "nuget: MarkdigExtensions.Bootstrap.Admonitions, 0.3.0"
#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 MarkdigExtensions.Bootstrap.Admonitions as a Cake Addin
#addin nuget:?package=MarkdigExtensions.Bootstrap.Admonitions&version=0.3.0

// Install MarkdigExtensions.Bootstrap.Admonitions as a Cake Tool
#tool nuget:?package=MarkdigExtensions.Bootstrap.Admonitions&version=0.3.0

Markdig.Extensions.Bootstrap.Admonition

This is an extension for Markdig to add admonitions (also known as call-outs).

Admonition samples

Initialization

We can instanciate BootstrapAdmonitionExtension in two ways.

The first, and the simplest way:

new BootstrapAdmonitionExtension("Warning", "Danger", "Tips", "Notes")

We only have to specify the titles for the four admonitions configured by default.

The second allows us to create our own types of admonitions: :

new BootstrapAdmonitionExtension(new List<BootstrapAdmonitionTemplate>()
{
    new BootstrapAdmonitionTemplate("tip", "success", "lightbuld", "Tip"),
    new BootstrapAdmonitionTemplate("note", "info", "info-circle-fill", "Notes"),
    ...
}

To instanciate BootstrapAdmonitionTemplate, we have to provide 4 aguments:

  1. The key name of the admonition
  2. The name of the bootstrap alert type. See the bootstrap documentation
  3. The name of the bootstrap icon. See the bootstrap documentation
  4. The title of the admonition, as it will appear in the rendering.

How to use

In our markdown document we will use the following syntax specifying the key name of the admonition we want to use (case insensitive). :

::: warning
This is a sample warning 
:::
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.3.0 598 2/19/2022