Crates.io | twitter-card |
lib.rs | twitter-card |
version | 1.0.1 |
source | src |
created_at | 2018-11-17 19:42:09.422096 |
updated_at | 2018-11-18 01:40:07.362201 |
description | Generate HTML for Twitter Card integration. |
homepage | |
repository | https://github.com/chooxide/twitter-card |
max_upload_size | |
id | 97279 |
size | 50,172 |
Generate HTML for Twitter Card integration.
Basic usage
use twitter_card::{Summary, TwitterCard};
let card = Summary::builder()
.site("@flickr")
.title("Small Island Developing States Photo Submission")
.desc("View the album on Flickr.")
.image("https://farm6.staticflickr.com/5510/14338202952_93595258ff_z.jpg")
.build();
<--! Output -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@flickr" />
<meta name="twitter:title" content="Small Island Developing States Photo Submission" />
<meta name="twitter:description" content="View the album on Flickr." />
<meta name="twitter:image" content="https://farm6.staticflickr.com/5510/14338202952_93595258ff_z.jpg" />
$ cargo add twitter-card
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