typed-open-graph 0.1.2

The Open Graph Protocol Builder
typed-open-graph-0.1.2 has been yanked.
Visit the last successful build: typed-open-graph-0.2.0

Typed Open Graph

The Open Graph Protocol Builder that generates the structured data that you can use with the template engine of your choice.

Example

use typed_open_graph::{Website, OpenGraphTypeMarker};
use url::Url;

fn main() {
    let website = Website::builder(
        "The Title",
        Url::parse("https://example.com/image.jpg").unwrap(),
        Url::parse("https://example.com/").unwrap()
    )
        .image_type("image/jpeg")
        .build();

    // should print generated structure ready to be used in template engine
    dbg!(website);
}

Installation

cargo add typed-open-graph