Previews any page no other provider claims, for rich-content-service.ts,
from whatever metadata its HTML carries. Its reading of a page,
genericPreview, is also the base of the Bandcamp, SoundCloud and
YouTube channel previews.
f
genericPreview(): RichContent
page: Page,
url: string,
finalUrl: string
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.
v
genericProvider: RichContentProvider
Matches every URL, so it comes last in the service's list.
Usage
import * as mod from "api/remote/providers/generic.ts";