Classes
The following classes are available globally.
-
A Kitura
TemplateEngine
that enables a Kitura server to render HTML content generated from Markdown templates (.md
files).This class also provides helper methods for converting Markdown formatted text from a
String
orData
to HTML.Note
Under the covers this templating engine uses the cmark C language reference implementation of Markdown.Usage Example:
See morerouter.add(templateEngine: KituraMarkdown()) router.get("/docs") { _, response, next in try response.render("Example.md", context: [String:Any]()) response.status(.OK) next() }
Declaration
Swift
public class KituraMarkdown : TemplateEngine