2020-07-27 21:55:54 +02:00
|
|
|
# Open Graph Protocol
|
|
|
|
|
|
|
|
This is a standard that uses websites to tell external websites how a link preview should look
|
|
|
|
|
|
|
|
Works by defining `<meta/>` tags like `<meta property="og:{}" content="{}" />`
|
|
|
|
|
|
|
|
## Example
|
|
|
|
|
|
|
|
```html
|
|
|
|
<html prefix="og: https://ogp.me/ns#">
|
|
|
|
<head>
|
|
|
|
<title>The Rock (1996)</title>
|
|
|
|
<meta property="og:title" content="The Rock" />
|
|
|
|
<meta property="og:type" content="video.movie" />
|
|
|
|
<meta property="og:url" content="https://www.imdb.com/title/tt0117500/" />
|
|
|
|
<meta property="og:image" content="https://ia.media-imdb.com/images/rock.jpg" />
|
|
|
|
...
|
|
|
|
</head>
|
|
|
|
...
|
|
|
|
</html>
|
|
|
|
```
|
|
|
|
|
2020-07-27 23:24:50 +02:00
|
|
|
## Further reading
|
2020-07-27 21:55:54 +02:00
|
|
|
|
2020-07-27 23:24:50 +02:00
|
|
|
- [Official documentation](https://ogp.me/)
|
2020-07-27 21:55:54 +02:00
|
|
|
|
|
|
|
## Why learned this
|
|
|
|
|
|
|
|
- I Linked to [[Bolivar Paralelo]] in [[My LinkedIn]] and the preview was garbage
|