Skip to main content

LLM helper API

Build the link attributes for a markdown alternate so HTML pages can advertise text-first twins to LLM-oriented clients.

Reference

  • Use absolute or app-valid markdown paths that match a real alternate route.
  • The helper only returns link attributes; the page still owns placement in the head slot.
const alternate = createMarkdownAlternateLink({ href: "/components/button.md", title: "Button markdown twin" });