render_md

render_md is a dead simple fast library for rendering markdown to html. It’s only dependency is the gleam standard library

Types

Options that can be used with render_with_options

pub type Options {
  Options(class_names: Dict(String, String))
}

Constructors

  • Options(class_names: Dict(String, String))

    class_names allows tou to specify classes to be assigned to html tags

    Options(class_names: dict.from_list([#("h1", "heading1"), #("img", "responsive image"), #("code", "block-code")]))
    

Functions

pub fn render(markdown: String) -> String

render the html from a given markdown string without bothering about passing options

render("### heading 3")
pub fn render_with_options(
  markdown: String,
  options: Options,
) -> String

render the html from a given markdown string while passing options like class_names

render_with_options("### heading 3", Options(class_names: dict.from_list([#("h3", "awesome-heading")])))
Search Document