The Bookmark plugin uses cheerio to find the targeted page metadata like the description, title, image, etc and generate the HTML for the Bookmark block.
$ npm install @notion-render/bookmark-plugin
import { NotionRenderer } from '@notion-render/client';
import { Client } from '@notionhq/client';
import bookmark from '@notion-render/bookmark-plugin';
const client = new Client({ auth: process.env.NOTION_TOKEN });
const renderer = new NotionRenderer({ client });
renderer.use(bookmar());
renderer.render(...blocks);
Syneki est un agence DevOps & Cloud. Nous construisons des infrastructures Cloud "next-generation".
<a href="https://example.org/" target="_blank" class="notion-bookmark" data-url="https://syneki.com/en">
<div class="bookmark-info">
<div class="bookmark-title">
Syneki | Cloud & DevOps Agency test
</div>
<p class="bookmark-description">
Impetu eosque ultimam in mortuorum artuum membrorum ampla abiecerunt impetu artuum conpage
</p>
<div class="bookmark-footer">
<img class="bookmark-icon" src="https://syneki.com/favicon.ico" />
<div class="bookmark-url">https://syneki.com/en</div>
</div>
</div>
<div class="bookmark-thumbnail">
<img src="https://syneki.com/banner.png" />
</div>
</a>