html icon indicating copy to clipboard operation
html copied to clipboard

Support for the Open Graph protocol

Open FallBackITA27 opened this issue 1 year ago • 4 comments

https://ogp.me/ it should just be adding the property attribute to meta elements :P

FallBackITA27 avatar Oct 13 '23 13:10 FallBackITA27

heh, funny you should mention that - open-graph was one of the first Rust crates I ever authored.

I'm not sure whether we should keep this as a separate package implemented on top of the html crate. Or whether we want to integrate it directly into html. Whichever way we go though, it would be great if we could parse the specification page, and automatically generate the types from it.

Do you have any thoughts on this?

yoshuawuyts avatar Oct 13 '23 13:10 yoshuawuyts

Actually, the more I think about this the more I'm convinced this should probably just be its own crate. I'd be okay if we moved it into the repository so we can build it and make it depend on the html crate.

We could probably provide an extension trait for the Head element/builder to automatically allow opengraph data to be appended.

yoshuawuyts avatar Oct 13 '23 14:10 yoshuawuyts

it took me some time messing around with other issues to notice that this was already partially implemented. As for handling, why not make it a feature?

FallBackITA27 avatar Oct 13 '23 14:10 FallBackITA27

I mean, yeah making it a feature would also work. I guess the key thing I care about is that we can generate it from the spec. If you'd be willing to PR that in I'd be most grateful!

yoshuawuyts avatar Oct 13 '23 20:10 yoshuawuyts