webbby/
lib.rs

1//! # Webbby - The one web framework to rule them all!
2//!
3//! Entry to the crate is provided by `build()`
4
5use std::io::Write;
6
7/// # Build your site!
8/// Takes a file and the HTML of your page
9/// 
10/// Example:
11/// ```rust
12/// use webbby::build;
13/// use std::fs::File;
14///
15/// fn main() -> std::io::Result<()> {
16///     let content = "<h1>Hello, World!</h1>
17///     <p>Hyd Today?</p>";
18///     let out = File::create("foo.txt")?;
19///     build(out, content);
20///     Ok(())
21/// }
22/// ```
23pub fn build(mut f: std::fs::File, c: &str) {
24    f.write_all(c.as_bytes()).unwrap();
25}