import { n as SEO_TITLE_MAX, t as SEO_DESCRIPTION_MAX } from "../../limits-_bvqictp.js"; import { a as JsonLdOpeningHours, c as JsonLdSettings, d as jsonLdScript, f as localBusinessJsonLd, i as JsonLdDay, l as LocalBusinessFacts, m as productJsonLd, n as JsonLdAddress, o as JsonLdOptions, p as organizationJsonLd, r as JsonLdCrumb, s as JsonLdProduct, t as JsonLd, u as breadcrumbJsonLd } from "../../json-ld-D0yClzSm.js"; //#region src/core/seo/share.d.ts /** What a share of a page shows: an image URL, the site's generated card, or nothing. */ type ShareImageSource = { kind: "image"; src: string; } | { kind: "card"; } | { kind: "none"; }; interface ShareImageInput { /** The page's own share image (`pages.ogImage`). */ ogImage?: string | null; /** Whether the site renders a share card for every page. */ cards?: boolean; /** The site-wide default image (`site_settings.defaultOgImageUrl`). */ defaultImage?: string | null; } /** * The share image, in order: the page's own `ogImage`, then the site's * generated card when it renders one, then the site-wide default image. */ declare function shareImageSource(input: ShareImageInput): ShareImageSource; //#endregion //#region src/core/seo/sitemap.d.ts /** One URL in a sitemap. */ interface SitemapEntry { /** The absolute URL. */ loc: string; /** When the page last changed. A `Date` or an ISO 8601 string; left out when absent. */ lastmod?: Date | string | null; } /** * Build a `sitemap.xml` document from `entries`, in the order given, with every * value escaped. An entry whose `lastmod` isn't a valid date is listed without * one. */ declare function sitemapXml(entries: readonly SitemapEntry[]): string; interface RobotsTxtOptions { /** The sitemap's absolute URL, listed as `Sitemap:`. */ sitemapUrl?: string; /** * Paths no crawler should fetch, such as an API prefix. Don't list a page * that's `noindex`: a crawler that can't fetch a page never sees its * `noindex`, so a blocked page can still be indexed from links to it. */ disallow?: readonly string[]; } /** * Build a `robots.txt` for every crawler. With no `disallow`, it allows * everything. */ declare function robotsTxt(options?: RobotsTxtOptions): string; //#endregion //#region src/core/seo/index.d.ts /** The page fields the head reads. A `pages` row fits as it is. */ interface PageHeadPage { slug: string; title: string; /** Rich HTML; the description falls back to its text. */ body?: string | null; seoTitle?: string | null; seoDescription?: string | null; ogImage?: string | null; noindex?: boolean | null; } /** The site settings fields the head reads. A `site_settings` row fits as it is. */ interface PageHeadSettings { siteName?: string | null; faviconUrl?: string | null; metaDescription?: string | null; defaultOgImageUrl?: string | null; disableIndexing?: boolean | null; } interface PageHeadInput { page: PageHeadPage; settings?: PageHeadSettings | null; /** The site's origin, for example, `https://example.com`. */ origin: string; /** The request's path, with or without its query string. */ path: string; /** * Builds the `` from the page's title and the site name. Omit to use * the page's title as it is. The separator is the site's choice; the house * style is a pipe, as in `About | Example Organization`. */ titleTemplate?: (pageTitle: string, siteName: string | undefined) => string; /** The slug a site serves at `/`. Its canonical URL is the origin's root. */ homeSlug?: string; /** * Query parameters the page's content depends on. The canonical URL keeps * these, sorted, and drops every other parameter. Default: none. */ keepParams?: readonly string[]; /** * The URL of the site's generated share card for a page, given its slug and * its SEO title or title. Omit when the site renders no cards. A relative URL * resolves against `origin`. */ shareCardUrl?: (slug: string, title: string) => string; /** The favicon when the settings have none. */ icon?: string; /** `og:type`. Default `"website"`. */ ogType?: string; /** * Structured data for the page, from the JSON-LD builders. Each node that * isn't `undefined` prints as its own `<script type="application/ld+json">`. * Mark up only what the page shows. */ jsonLd?: readonly (JsonLd | undefined)[]; } /** Everything a page's head declares. Serialize it with {@link renderHeadTags}. */ interface PageHead { /** The `<title>`, after the site's title template. */ title: string; /** Omitted rather than empty when nothing describes the page. */ description?: string; robots?: "noindex"; canonical: string; icon?: string; og: { /** The page's own title, without the site name. */ title: string; description?: string; url: string; type: string; siteName?: string; /** Absolute. */ image?: string; }; twitterCard: "summary" | "summary_large_image"; /** The page's JSON-LD nodes; absent when it has none. */ jsonLd?: readonly JsonLd[]; } /** * The canonical URL for a request: the origin plus the path, with every query * parameter dropped except `keepParams`, which stay sorted. A page's content * doesn't vary by its query string, so without this every `?utm_source=…` or * `?ref=…` variant is another indexable copy. */ declare function canonicalUrl(origin: string, path: string, keepParams?: readonly string[]): string; /** * The head of a content page, from its row, the site settings, and the * request. Pure, so it runs the same in any framework or a unit test. * * - **Title:** the page's SEO title, then its title, through `titleTemplate`. * - **Description:** the SEO description, then the body's text (clamped to * `SEO_DESCRIPTION_MAX`), then the site-wide meta description. Omitted when * none of them has text, never `content=""`. * - **Robots:** `noindex` when the page or the site's "Hide from search * engines" says so. * - **Canonical:** see {@link canonicalUrl}; the home slug maps to `/`. * - **Share image:** see {@link shareImageSource}. */ declare function pageHead(input: PageHeadInput): PageHead; /** * {@link PageHead} as HTML: `<title>`, the description, robots, canonical, * icon, Open Graph, and Twitter tags, then any JSON-LD scripts, one per line, * every value escaped. Print it inside `<head>` as raw HTML; the charset and * viewport stay the page's own. */ declare function renderHeadTags(head: PageHead): string; //#endregion export { type JsonLd, type JsonLdAddress, type JsonLdCrumb, type JsonLdDay, type JsonLdOpeningHours, type JsonLdOptions, type JsonLdProduct, type JsonLdSettings, type LocalBusinessFacts, PageHead, PageHeadInput, PageHeadPage, PageHeadSettings, type RobotsTxtOptions, SEO_DESCRIPTION_MAX, SEO_TITLE_MAX, type ShareImageInput, type ShareImageSource, type SitemapEntry, breadcrumbJsonLd, canonicalUrl, jsonLdScript, localBusinessJsonLd, organizationJsonLd, pageHead, productJsonLd, renderHeadTags, robotsTxt, shareImageSource, sitemapXml };