EPS.Extensions NuGet Packages

Wednesday, June 26, 2019

EPS.Extensions NuGet Packages

Here at Endpoint Systems we're cranking out a number of high-quality ASP.NET Core web apps for the masses. As a result, we're spending a tremendous amount of time researching and building small but (we think!) helpful utilities for making the journey a little easier for all of us. We'll keep this blog post fresh with additional packages as they show up down the road, but here are two that we've recently put together in fairly short order.

UrlFriendly

Sometimes putting together a SEO or index-friendly slug/URL can be a challenge, especially when dealing with European characters with emaulets and the like. Johan Boström, whose surname highlights part of the problem we're facing, posted a great snippet of code wherein he builds some code to fix this. We've simply taken this code snippet (he's got a GitHub for it, but it's just demo code) and made a library and NuGet package out of it.

YamlMarkdown

YAML is a fascinating "schema-less" language with weird constructs that make it good for terse outlining (tables of contents, for example) and other human-readable output, so naturally it's used for stuffing system commands into for painful troubleshooting issues in Docker and 43,000 other tales of woe on StackOverflow. Still, it has its good moments, like adding context to a Markdown file in a format often referred to as "YAML front matter in a Markdown" or something similar.

While apps like Wyam have this in their infrastructure as a feature, nobody really seemed to have it as something that could be quickly/easily consumed as part of a web app, and that's how the YamlMarkdown package was formed. 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.

To be very clear, these libraries were done in some haste, so they are in bare-bones, limited functionality. All pull requests are welcome for consideration, but otherwise things will probably stay as-is until additional features are needed in some other project scope.