mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
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
11 lines
248 B
JavaScript
11 lines
248 B
JavaScript
module.exports = [
|
|
require('./card-markdown'),
|
|
require('./code'),
|
|
require('./embed'),
|
|
require('./bookmark'),
|
|
require('./hr'),
|
|
require('./html'),
|
|
require('./image'),
|
|
require('./markdown'),
|
|
require('./gallery')
|
|
];
|