aboutsummaryrefslogtreecommitdiff
path: root/examples/html.rs
blob: 802bd8ed94619b20749fab6a23131a6ec549ca1e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! This example demonstrates Germ's capabilities for converting Gemtext to
//! HTML.

fn main() {
  // Convert the Gemtext to HTML
  let html = germ::convert::from_string(
    germ::EXAMPLE_GEMTEXT,
    &germ::convert::Target::HTML,
  );

  // Write the HTML to a file
  std::fs::write("examples/convert.html", html)
    .expect("could not write to file");
}