Utilities are provided to render Markdown files as HTML.
This is used to great effect in the docbrowse module, which exposes all Markdown in /doc.
For rendering documentation, a helper is provided. It accepts a transformation function:
1 2 3 4
title,html,err:=doc.HTML("key","file.md",func(sstring)(string,string,error){ // FormatCleanMarkup formats the HTML for displaying in the app, and inserts an optional icon returncutil.FormatCleanMarkup(s,"my-icon") })
To render your own files, simply call the following utility method, then clean it for your template: