Skip to content

About

The Open Graph Protocol Builder

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

Repository files navigation

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

About

The Open Graph Protocol Builder

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages