UNPKG

@expofp/floorplan

Version:

Interactive floor plan library for expos and events

38 lines • 1.78 kB
/** * The search-facing `<head>` (and the one `<h1>`) of an event page. * * The event shell served on `<expo>.expofp.com` is a bare HTML stub (aws-code * `expo-index-v2`) with no description, heading or canonical, so crawlers that * render JS get whatever the SDK writes. Every tag here fills a gap only — a * page (or a future edge-generated shell) that already carries one wins — and * the caller writes them only on our own event hosts (see is-own-domain.ts). */ /** Search engines cut meta descriptions off past roughly this length. */ export declare const MAX_DESCRIPTION = 160; interface EventHeadSource { title: string; subtitle: string; locale: string; exhibitors: readonly unknown[]; hideExhibitors: boolean; } export interface EventHead { description: string; /** Undefined when the event has no name to head the page with. */ heading: string | undefined; /** Undefined unless `locale` is a well-formed BCP 47 tag. */ lang: string | undefined; } /** Cut to `max` characters on a word boundary, marking the cut with an ellipsis. */ export declare function truncateAtWord(text: string, max: number): string; export declare function buildEventHead(source: EventHeadSource): EventHead; /** Write the event head into `doc`, filling only what the page lacks. */ export declare function applyEventHead(doc: Document, head: EventHead, canonicalUrl: string): void; /** * Keep a page out of the index — the "Event not found" screen: every unknown * or removed event host answers 200 with the same shell (a soft 404 the edge * cannot yet turn into a real one), so without this they index as duplicates. */ export declare function markNotIndexable(doc: Document): void; export {}; //# sourceMappingURL=event-head.d.ts.map