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 or Data to HTML.

    Note

    Under the covers this templating engine uses the cmark C language reference implementation of Markdown.

    Usage Example:

    router.add(templateEngine: KituraMarkdown())
    
    router.get("/docs") { _, response, next in
        try response.render("Example.md", context: [String:Any]())
        response.status(.OK)
        next()
    }
    
    See more

    Declaration

    Swift

    public class KituraMarkdown : TemplateEngine