function genericPreview
genericPreview(
page: Page,
url: string,
finalUrl: string
): RichContent

Returns the preview of the page url that page read, served from finalUrl after redirects. Each field falls back from OG tags to Twitter tags, JSON-LD and the markup itself. The icon and brand color feed the placeholder the frontend draws when there is no thumbnail.

Parameters

page: Page
url: string
finalUrl: string

Return Type

Usage

import { genericPreview } from "api/remote/providers/generic.ts";