Skip to content

Generates rich GDPR-conform link previews / embeds in your astro project

License

Notifications You must be signed in to change notification settings

Suven/astro-link-previews

Repository files navigation

astro-link-previews

How it could look

Demo / Usage / Configuration

Provides a single component, to display links with thumb and description previews or 2-click iframe embeds. Ships as minimal third-party connections and js as possible.

Powered by https://microlink.io/

Setup

Install via npm i astro-link-previews.

If you wish to predownload all remote assets, adjust your astro.config.mjs:

image: {
  //service: squooshImageService(),
  remotePatterns: [{ protocol: "https" }],
},

After that place a Card on any desires astro page:

---
import Card from "astro-link-previews";
---

<Card url="https://www.youtube.com/watch?v=L_JQOH1tEEA" />