ktsu.Frontmatter
1.2.24
Prefix Reserved
.NET 8.0
This package targets .NET 8.0. The package is compatible with this framework or higher.
.NET Standard 2.0
This package targets .NET Standard 2.0. The package is compatible with this framework or higher.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package ktsu.Frontmatter --version 1.2.24
NuGet\Install-Package ktsu.Frontmatter -Version 1.2.24
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="ktsu.Frontmatter" Version="1.2.24" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ktsu.Frontmatter" Version="1.2.24" />
<PackageReference Include="ktsu.Frontmatter" />
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 ktsu.Frontmatter --version 1.2.24
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ktsu.Frontmatter, 1.2.24"
#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 ktsu.Frontmatter@1.2.24
#: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=ktsu.Frontmatter&version=1.2.24
#tool nuget:?package=ktsu.Frontmatter&version=1.2.24
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
ktsu.Frontmatter
A .NET library for processing and manipulating YAML frontmatter in markdown files.
Features
- Extract, add, replace, and remove frontmatter from markdown documents
- Combine multiple frontmatter sections into a single section
- Standardize property names using intelligent matching
- Sort properties according to standard conventions
- Merge similar properties using different strategies
- High performance with caching for repeated operations
Installation
dotnet add package ktsu.Frontmatter
Usage
using ktsu.Frontmatter;
// Extract frontmatter from a markdown document
string markdown = File.ReadAllText("document.md");
var frontmatter = Frontmatter.ExtractFrontmatter(markdown);
// Add frontmatter to a document
var properties = new Dictionary<string, object>
{
{ "title", "My Document" },
{ "date", DateTime.Now },
{ "tags", new[] { "documentation", "markdown" } }
};
string withFrontmatter = Frontmatter.AddFrontmatter(markdown, properties);
// Replace frontmatter
string replaced = Frontmatter.ReplaceFrontmatter(markdown, properties);
// Remove frontmatter
string withoutFrontmatter = Frontmatter.RemoveFrontmatter(markdown);
// Combine multiple frontmatter sections
string combined = Frontmatter.CombineFrontmatter(markdown);
// Customize property naming and ordering
string customized = Frontmatter.CombineFrontmatter(
markdown,
FrontmatterNaming.Standard, // Standardize property names
FrontmatterOrder.Sorted, // Sort properties in standard order
FrontmatterMergeStrategy.Conservative // Merge similar properties
);
// Extract just the document body (content after frontmatter)
string body = Frontmatter.ExtractBody(markdown);
Advanced Features
Property Naming
Control how property names are handled:
FrontmatterNaming.AsIs: Keep property names as-isFrontmatterNaming.Standard: Standardize property names using common conventions
Property Ordering
Control how properties are ordered:
FrontmatterOrder.AsIs: Keep properties in the order they appearFrontmatterOrder.Sorted: Sort properties according to standard conventions
Merge Strategies
Control how similar properties are merged:
FrontmatterMergeStrategy.None: Do not merge any propertiesFrontmatterMergeStrategy.Conservative: Only merge properties using predefined mappingsFrontmatterMergeStrategy.Aggressive: Merge properties using basic pattern matchingFrontmatterMergeStrategy.Maximum: Merge properties using semantic analysis
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 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 is compatible. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- HashDepot (>= 2.0.3)
- ktsu.Extensions (>= 1.6.9)
- ktsu.FuzzySearch (>= 1.2.38)
- System.Memory (>= 4.6.3)
- System.Threading.Tasks.Extensions (>= 4.6.3)
- YamlDotNet (>= 18.1.0)
-
.NETStandard 2.1
- HashDepot (>= 2.0.3)
- ktsu.Extensions (>= 1.6.9)
- ktsu.FuzzySearch (>= 1.2.38)
- YamlDotNet (>= 18.1.0)
-
net10.0
- HashDepot (>= 2.0.3)
- ktsu.Extensions (>= 1.6.9)
- ktsu.FuzzySearch (>= 1.2.38)
- YamlDotNet (>= 18.1.0)
-
net8.0
- HashDepot (>= 2.0.3)
- ktsu.Extensions (>= 1.6.9)
- ktsu.FuzzySearch (>= 1.2.38)
- YamlDotNet (>= 18.1.0)
-
net9.0
- HashDepot (>= 2.0.3)
- ktsu.Extensions (>= 1.6.9)
- ktsu.FuzzySearch (>= 1.2.38)
- YamlDotNet (>= 18.1.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on ktsu.Frontmatter:
| Package | Downloads |
|---|---|
|
ktsu.KtsuTools.Markdown
KtsuTools is a unified developer tools suite that consolidates multiple ktsu-dev utilities into a single CLI application with consistent UX powered by Spectre.Console. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.2.25 | 105 | 9/4/2026 |
| 1.2.24 | 94 | 9/3/2026 |
| 1.2.23 | 187 | 8/28/2026 |
| 1.2.22 | 103 | 8/27/2026 |
| 1.2.21 | 109 | 8/24/2026 |
| 1.2.20 | 103 | 8/21/2026 |
| 1.2.19 | 107 | 8/20/2026 |
| 1.2.18 | 102 | 8/19/2026 |
| 1.2.17 | 100 | 8/18/2026 |
| 1.2.16 | 108 | 8/17/2026 |
| 1.2.15 | 127 | 8/11/2026 |
| 1.2.14 | 184 | 7/2/2026 |
| 1.2.13 | 143 | 7/1/2026 |
| 1.2.12 | 140 | 6/30/2026 |
| 1.2.11 | 164 | 6/29/2026 |
| 1.2.10 | 563 | 3/2/2026 |
| 1.2.9 | 153 | 2/26/2026 |
| 1.2.8 | 142 | 2/25/2026 |
| 1.2.7 | 146 | 2/23/2026 |
| 1.2.7-pre.1 | 95 | 2/17/2026 |
Loading failed
## v1.2.24 (patch)
No significant changes detected since v1.2.23.