mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 05:50:35 +03:00
c2aa62083c
requires https://github.com/TryGhost/Ghost-Admin/pull/1293 - updates `oembed` endpoint behaviour - if an oembed provider is not found then we use `metascraper` to populate a metadata object - when metadata is returned rather than an oembed response the payload will look like this: ```json { "url": "...", "type": "bookmark", "metadata": { "url": "...", "title": "...", "description": "...", "author": "...", "publisher": "...", "thumbnail": "...", "icon": "..." } } ``` - adds a `bookmark` card which generates output for the bookmark card: ```html <figure class="kg-card kg-bookmark-card"> <a href="[URL]" class="kg-bookmark-container"> <div class="kg-bookmark-content"> <div class="kg-bookmark-title">[TITLE]</div> <div class="kg-bookmark-description">[DESCRIPTION]</div> <div class="kg-bookmark-metadata"> <img src="[ICON]" class="kg-bookmark-icon"> <span class="kg-bookmark-author">[AUTHOR]</span> <span class="kg-bookmark-publisher">[PUBLISHER]</span> </div> </div> <div class="kg-bookmark-thumbnail"> <img src="[THUMBNAIL]"> </div> </a> </figure> ``` - if a particular bit of data does not exist then the associated html element will not be present |
||
---|---|---|
.. | ||
atoms | ||
cards | ||
converters | ||
create-card.js | ||
index.js |