typed-open-graph

Crates.iotyped-open-graph
lib.rstyped-open-graph
version0.2.0
created_at2025-11-10 21:03:33.85774+00
updated_at2025-11-12 06:50:46.860767+00
descriptionThe Open Graph Protocol Builder
homepage
repositoryhttps://github.com/cjtoolkit/typed-open-graph
max_upload_size
id1926189
size48,254
Christopher John Jackson (CJ-Jackson)

documentation

README

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
Commit count: 0

cargo fmt