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
<PackageReference Include="MarkdigExtensions.Bootstrap.Admonitions" Version="0.3.0" />
paket add MarkdigExtensions.Bootstrap.Admonitions --version 0.3.0
#r "nuget: MarkdigExtensions.Bootstrap.Admonitions, 0.3.0"
// 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).
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:
- The key name of the admonition
- The name of the bootstrap alert type. See the bootstrap documentation
- The name of the bootstrap icon. See the bootstrap documentation
- 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 | Versions 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. |
-
net6.0
- Markdig (>= 0.26.0)
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 | 634 | 2/19/2022 |