Skip to content

yoshuawuyts/open-graph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

About

(wip) Generate HTML for Open Graph integration.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages