Crates.io | open-graph |
lib.rs | open-graph |
version | 0.0.0 |
source | src |
created_at | 2019-01-18 17:32:23.613008 |
updated_at | 2019-01-18 17:32:23.613008 |
description | Generate HTML for Open Graph integration. |
homepage | |
repository | https://github.com/rust-net-web/open-graph |
max_upload_size | |
id | 109361 |
size | 32,632 |
Generate HTML for Open Graph integration.
Basic usage
use open_graph::{OpenGraph, ObjectType};
let card = OpenGraph::builder()
.site("@flickr")
.title("The Rock")
.type(ObjectType::VideoMovie)
.image("http://ia.media-imdb.com/images/rock.jpg")
.build();
<--! Output -->
<meta property="og:title" content="The Rock" />
<meta property="og:type" content="video.movie" />
<meta property="og:url" content="http://www.imdb.com/title/tt0117500/" />
<meta property="og:image" content="http://ia.media-imdb.com/images/rock.jpg" />
$ cargo add open-graph
This crate uses #![deny(unsafe_code)]
to ensure everything is implemented in
100% Safe Rust.
Want to join us? Check out our "Contributing" guide and take a look at some of these issues:
MIT OR Apache-2.0