DEV Community

xTEN
xTEN

Posted on

How to Populate Metadata When Converting Markdown to HTML in ASP.NET

...Using a JSON Metadata file, a single view and a dynamic action method to pass metadata into Markdown converted HTML pages.

In a previous blog post, I explained how I used a Markdown to HTML conversion tool to turn our Markdown files into HTML webpages for the Aireforge documentation. In summary, all Markdown files were routed through a single dynamic action method with the markdown filename passed as an input parameter. The action method then extracted the content of the Markdown file, converted it to HTML and used a single view to generate each file’s content as and when it was called.

Typically, action methods represent one page, and as such any metadata for a given page (title, metadescription, request path) is hard-coded within the action method..

Read the full blog

Top comments (0)