EPS.Extensions.YamlMarkdown
8.0.0
dotnet add package EPS.Extensions.YamlMarkdown --version 8.0.0
NuGet\Install-Package EPS.Extensions.YamlMarkdown -Version 8.0.0
<PackageReference Include="EPS.Extensions.YamlMarkdown" Version="8.0.0" />
paket add EPS.Extensions.YamlMarkdown --version 8.0.0
#r "nuget: EPS.Extensions.YamlMarkdown, 8.0.0"
// Install EPS.Extensions.YamlMarkdown as a Cake Addin #addin nuget:?package=EPS.Extensions.YamlMarkdown&version=8.0.0 // Install EPS.Extensions.YamlMarkdown as a Cake Tool #tool nuget:?package=EPS.Extensions.YamlMarkdown&version=8.0.0
YamlMarkdown
This NuGet package combines YamlDotNet and the Markdig Markdown parsing engine and makes a dead-simple class for parsing a file or TextReader object and deserializing your YAML object type as well as giving you your content in the original Markdown and generic HTML renderings.
The Markdig plugin uses a YAML front matter extension that will parse a YAML front matter into the MarkdownDocument.
Ours treats the YAML front matter as a completely separate object to be used for other purposes (SEO metadata in our use case).
How It Works
// Article in this case is a class of metadata properties
// saved in the YAML
var parser = new YamlMarkdown<Article>();
// we get the Article object here
var article = parser.Parse("article.md");
//...and here
Console.WriteLine(parser.DataObject);
//...and the markup (separate from the YAML) here
Console.WriteLine(parser.Markdown);
//...and the parsed HTML here
Console.WriteLine(parser.Html);
The YAML markup at the top of your Markdown file must end with three dashes and a newline before your Markdown starts in order for this to work.
Example:
Title: Blog title
Description: "Blog description."
Published: 10/3/2019
Updated: 05/07/2020
Keywords: this, that, something else
Image: https://res.cloudinary.com/endpoint-systems/image/upload/v1548616596/gae_qlaf4t.png
Categories:
- Category1
- Category2
---
(blog post here)
Product | Versions 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. |
-
net8.0
- Html2Markdown (>= 6.2.1.4)
- Markdig (>= 0.37.0)
- YamlDotNet (>= 15.3.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on EPS.Extensions.YamlMarkdown:
Package | Downloads |
---|---|
MeshWeaver.Layout
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
8.0.0 | 399 | 6/18/2024 |
6.1.0 | 204 | 12/29/2023 |
6.0.2 | 355 | 2/1/2023 |
6.0.1 | 337 | 12/13/2022 |
6.0.0 | 318 | 1/5/2022 |
5.0.0 | 360 | 5/13/2021 |
1.0.0 | 512 | 8/25/2020 |
0.9.0 | 448 | 6/27/2020 |
0.8.0 | 503 | 5/18/2020 |
0.7.0 | 573 | 3/30/2020 |
0.6.0 | 526 | 2/4/2020 |
0.5.0 | 502 | 2/4/2020 |
0.4.0 | 539 | 10/25/2019 |
0.3.0 | 530 | 10/18/2019 |
0.2.0 | 529 | 10/15/2019 |
0.1.0 | 548 | 6/27/2019 |
update to .NET 8