How does Ghost make Bookmark cards?

Hello everyone,

I am really loving the feature of bookmark cards.

You can see them in action on my website here:

My question is, is it possible to use them in the theme?

In the editor, you only need to supply the URL and it builds the card. Video cards work the same way, you only provide the URL and it builds the whole card (you can provide a caption also).

I would like to have cards show up in certain types of pages in my theme. So rather than the editor I want to add them to the theme directly, if I cope the HTML it won’t do because I would have to add the details manually.

Is there a way to generate a bookmark or video card given a URL in a theme?

If you are interested in why I want to do this

This is a list of recommended books on my website:

The way each of those previews are generated is that on each book page there is an internal tag with the ISBN of the book. The recommended page sends the ISBN of the book to the Google Books API and pulls that data to build the book preview.

I would like to extend my recommended section to include articles and videos. To do this I want the previews to be in the form of bookmark cards. To do that I will need a way to build them at the level of theme as opposed to the editor. I wouldn’t want to have to pass in all the data manually, I would rather pass in a single link (or better yet a youtube code for videos) and build it from that.

If anyone knows a way to do this, let me know.

Thanks in advance!