Privacy and cookie policy

Html rendering of a GitHub MD file

This sample shows how to retrieve a MD file from GitHub, render it locally to HTML using Markdig library and then show it as a web page. The project is an Asp.Net (.NET Framework) web app. The logic can be easily adapted to Asp.Net Core (...todo).

  • simple.aspx : gets the content from GitHub and renders it to html. Images are left on GitHub and referenced as <img href="">
  • full.aspx : full solution with local caching of html and images and use of PrismJS for syntax highlighting of code blocks.

Links:

Output example sample1.md:

Output1

Original document: https://github.com/fhtino/aspnetstuff/blob/master/RenderGitHubMD/README.md
DISCLAIMER: Content and opinions are my own. None of the ideas expressed in this web-site are shared, supported, or endorsed in any manner by my current or former employers. Nothing here should be taken seriously and you understand and accept that you can use any suggestions, ideas, techincal solutions on this web-site only at your own risk. All trademarks are property of their respective owners.