Skip to content
HomePagesHomePages template kit

document

A single platform-hosted document — a pdf, spreadsheet, or office file the visitor opens in the browser or downloads.

A single platform-hosted document — a pdf, spreadsheet, or office file the visitor opens in the browser or downloads. The value resolves to one DocumentValue (served url plus filename, type and size); render it with Slot.Document, which is one anchor.

Reach for url({ accepts: "file" }) instead when the file lives somewhere else — a Drive or Dropbox link the platform neither stores nor serves.

fill takes a documentAssign, which picks one file out of the documents stored on the property. Usable standalone or as a list item — a list.of(document(...)) carries its own listFill and picks a SET from the same pool.

Import from @homepages/template-kit.

function document(opts: DocumentOptions): DocumentSlotDef & FillMark<BuiltDecision<"document-assign">>
Name Type Required Description
opts DocumentOptions required

DocumentSlotDef & FillMark<BuiltDecision<"document-assign">>

import { document, documentAssign } from "@homepages/template-kit";
document({ label: "Offering brochure", fill: documentAssign({ pick: "The full property brochure." }) });