package.elm-lang.org
package.elm-lang.org copied to clipboard
Open Graph Protocol metadata for version pages
Renders OGP metadata for package documentation pages which could be used to enable prettier rendering of Elm package links when shared at social sites, chat rooms and forums.
For example elm/http would have following metadata section:
<meta property="og:site_name" content="Elm Packages">
<meta property="og:title" content="elm/http 1.0.0">
<meta property="og:image" content="https://package.elm-lang.org/assets/elm_logo.svg">
<meta property="og:description" content="Make HTTP requests">
Following screenshot displays how Open Graph Preview extension for Chrome renders that metadata:

This could resolve #236.
I think it would probably be good if og:title included the username, since that's how packages are generally referred to both on the package site and when installing them. So for this example, "elm/http 1.0.0" instead of just "http 1.0.0".
@avh4 Great point! That's definitely something I have to do here.
I have now made the change suggested by @avh4 to include author name in the og:title, PR description and example screenshot were updated to reflect this change.
I also squashed changes into single commit to keep history clean.