# Preview a web page for a bookmark block

Fetches the page at `url` on the server and returns its title,
description, image and site name (Open Graph and Twitter tags, then
`<title>` and the description meta tag). The editor stores the result
in the bookmark block, so nothing is kept here and pages never fetch
the link again.

The fetch is an SSRF boundary: http and https only, on the default
ports, with no credentials in the URL; every address the host resolves
to must be public (private, loopback, link-local, multicast, CGNAT,
reserved, documentation, NAT64 and 6to4 ranges are refused) and the
connection goes to the checked address, for every redirect hop too;
at most 3 redirects, 6 seconds, 768 KB read. Only HTML is parsed; for
any other type the preview holds the URL and the host as the site
name. The image is returned only as a public https URL.

Limited to 30 new links a minute per person (per instance); results
are cached for 10 minutes.


Canonical: https://easerix.com/docs/developers/api/notes/collaboration/getLinkPreview

{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}

export default function Layout(props) {
  const { APIPage, OpenAPIPage } = props.components ?? {};
  // "APIPage" is the old name from v10, this allows both for backward compatibility
  const Comp = OpenAPIPage ?? APIPage;
  return (
    <>
      {props.children}
      <Comp document="notes" operations={[{"path":"/v1/link-preview","method":"get"}]} />
    </>
  );
}
