open-graph

Crates.ioopen-graph
lib.rsopen-graph
version0.0.0
sourcesrc
created_at2019-01-18 17:32:23.613008
updated_at2019-01-18 17:32:23.613008
descriptionGenerate HTML for Open Graph integration.
homepage
repositoryhttps://github.com/rust-net-web/open-graph
max_upload_size
id109361
size32,632
Yosh (yoshuawuyts)

documentation

https://docs.rs/open-graph

README

open-graph

crates.io version build status downloads docs.rs docs

Generate HTML for Open Graph integration.

Examples

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" />

Installation

$ cargo add open-graph

Safety

This crate uses #![deny(unsafe_code)] to ensure everything is implemented in 100% Safe Rust.

Contributing

Want to join us? Check out our "Contributing" guide and take a look at some of these issues:

References

License

MIT OR Apache-2.0

Commit count: 3

cargo fmt