[{"data":1,"prerenderedAt":1639},["ShallowReactive",2],{"duxt-navigation-docs-docs":3,"i-lucide:box":832,"i-lucide:rocket":837,"i-lucide:compass":839,"i-lucide:book-open":841,"i-lucide:ruler":843,"i-lucide:gavel":845,"i-lucide:list":847,"i-lucide:settings":849,"i-lucide:tag":851,"i-lucide:git-branch":853,"i-lucide:blocks":855,"i-lucide:component":857,"i-lucide:function-square":859,"i-lucide:route":861,"i-lucide:wrench":863,"i-lucide:chevron-right":865,"i-lucide:plug":867,"i-lucide:file-code":869,"i-lucide:send":871,"i-lucide:code":873,"i-lucide:menu":875,"i-lucide:chevron-down":877,"i-lucide:search":879,"i-simple-icons:github":881,"i-flag:gb-4x3":883,"i-lucide:moon":887,"docs-en-GB-\u002Freference\u002Fopenapi\u002Frequest-samples":889,"i-lucide:copy":1619,"i-lucide:thumbs-up":1621,"i-lucide:thumbs-down":1623,"i-lucide:star":1625,"i-lucide:circle-alert":1627,"i-simple-icons:discord":1629,"i-lucide:book-open-text":1631,"i-lucide:arrow-up-right":1633,"i-lucide:pencil":1635,"duxt-code-ts-export default defineAppConfig({\n  duxt: {\n    requestSamples: ['curl', 'php-guzzle', 'php-laravel']\n  }\n})\n":784,"duxt-code-ts-requestSamples: [\n  'curl',\n  {\n    id: 'ruby',\n    group: 'Ruby',\n    label: 'Net::HTTP',\n    language: 'ruby',\n    generate: (request) => `\nuri = URI('${request.url}')\nNet::HTTP.get(uri)\n`.trim()\n  }\n]\n":784,"duxt-code-yaml-paths:\n  \u002Fpets:\n    get:\n      x-codeSamples:\n        - lang: ruby\n          label: Net::HTTP\n          source: |\n            Net::HTTP.get(URI('https:\u002F\u002Fapi.example.com\u002Fpets'))\n":784,"duxt-code-ts-duxt: {\n  sampleLanguages: ['ruby']\n}\n":784,"i-lucide:arrow-left":1637},[4,25,94,148,743,751,771,826],{"title":5,"path":6,"stem":7,"children":8},"Introduction","\u002Fgetting-started","1.getting-started",[9,13,19],{"title":5,"path":6,"stem":10,"icon":11,"description":12},"1.getting-started\u002Findex","lucide:rocket","What duxt is, and what arrives with a single line of config.",{"title":14,"path":15,"stem":16,"icon":17,"description":18},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F1.installation","lucide:download","Add the layer, extend it, write Markdown.",{"title":20,"path":21,"stem":22,"icon":23,"description":24},"Configuration","\u002Fgetting-started\u002Fconfiguration","1.getting-started\u002F2.configuration","lucide:settings","One file configures the whole site — what belongs in it, and how it merges.",{"title":26,"path":27,"stem":28,"children":29},"Concepts","\u002Fconcepts","2.concepts",[30,34,40,46,52,58,64,70,76,82,88],{"title":26,"path":27,"stem":31,"icon":32,"description":33},"2.concepts\u002Findex","lucide:compass","How the layer works — the sources model, the URL scheme, the collections and the checks.",{"title":35,"path":36,"stem":37,"icon":38,"description":39},"Layers and overriding","\u002Fconcepts\u002Flayers","2.concepts\u002F1.layers","lucide:layers","What a Nuxt layer gives you, what it takes away, and which paths do not resolve the way they read.",{"title":41,"path":42,"stem":43,"icon":44,"description":45},"Theming","\u002Fconcepts\u002Ftheming","2.concepts\u002F10.theming","lucide:palette","How the theme is put together — owned components, one token layer, and a dark mode that switches on a class.",{"title":47,"path":48,"stem":49,"icon":50,"description":51},"Sources","\u002Fconcepts\u002Fsources","2.concepts\u002F2.sources","lucide:git-branch","One list of sources becomes every collection, prefix and version the site serves.",{"title":53,"path":54,"stem":55,"icon":56,"description":57},"URLs and versions","\u002Fconcepts\u002Furls-and-versions","2.concepts\u002F3.urls-and-versions","lucide:git-compare","How the repository and version segments appear, and what a reader in an old version is told.",{"title":59,"path":60,"stem":61,"icon":62,"description":63},"Collections","\u002Fconcepts\u002Fcollections","2.concepts\u002F4.collections","lucide:database","What Content builds from the sources, and the four things the schema adds.",{"title":65,"path":66,"stem":67,"icon":68,"description":69},"Generated sections","\u002Fconcepts\u002Fgenerated-sections","2.concepts\u002F5.generated-sections","lucide:file-cog","An artefact plus a type, published as pages — what the registry is, and the two policies a type answers.",{"title":71,"path":72,"stem":73,"icon":74,"description":75},"What the build checks","\u002Fconcepts\u002Fbuild-checks","2.concepts\u002F6.build-checks","lucide:shield-check","The silent failures this layer had, turned into messages.",{"title":77,"path":78,"stem":79,"icon":80,"description":81},"Machine readers","\u002Fconcepts\u002Fmachine-readers","2.concepts\u002F7.machine-readers","lucide:bot","What a model gets — llms.txt, the raw Markdown of any page, and a real MCP server.",{"title":83,"path":84,"stem":85,"icon":86,"description":87},"SEO","\u002Fconcepts\u002Fseo","2.concepts\u002F8.seo","lucide:search","What every page emits for crawlers and social cards, which module writes it, and the one value the layer cannot guess.",{"title":89,"path":90,"stem":91,"icon":92,"description":93},"Localisation","\u002Fconcepts\u002Flocalisation","2.concepts\u002F9.localisation","lucide:languages","Seven locales ship with the layer, and every configured string takes three forms.",{"title":95,"path":96,"stem":97,"children":98},"Guides","\u002Fguides","3.guides",[99,103,109,114,119,124,130,136,142],{"title":95,"path":96,"stem":100,"icon":101,"description":102},"3.guides\u002Findex","lucide:book-open","One task per page, start to finish — several repositories, several versions, several languages, and a deploy.",{"title":104,"path":105,"stem":106,"icon":107,"description":108},"Several repositories","\u002Fguides\u002Fseveral-repositories","3.guides\u002F1.several-repositories","lucide:folder-git","Serve the documentation of several projects from one site.",{"title":110,"path":111,"stem":112,"icon":56,"description":113},"Several versions","\u002Fguides\u002Fseveral-versions","3.guides\u002F2.several-versions","Serve the same documentation at several refs, with a switcher and a banner.",{"title":115,"path":116,"stem":117,"icon":92,"description":118},"Several languages","\u002Fguides\u002Fseveral-languages","3.guides\u002F3.several-languages","Serve the interface in several languages, and translate the pages themselves.",{"title":120,"path":121,"stem":122,"icon":44,"description":123},"Override the theme","\u002Fguides\u002Foverride-the-theme","3.guides\u002F4.override-the-theme","Change a colour, replace a component, add a shadcn-vue primitive.",{"title":125,"path":126,"stem":127,"icon":128,"description":129},"Move a page","\u002Fguides\u002Fmove-a-page","3.guides\u002F5.move-a-page","lucide:signpost","redirectFrom in the frontmatter, turned into route rules under every prefix.",{"title":131,"path":132,"stem":133,"icon":134,"description":135},"Deploy a site","\u002Fguides\u002Fdeploy-a-site","3.guides\u002F6.deploy-a-site","lucide:cloud-upload","Where a duxt site can run, what it needs there, and why content is not refreshed at runtime.",{"title":137,"path":138,"stem":139,"icon":140,"description":141},"Collect page feedback","\u002Fguides\u002Fcollect-page-feedback","3.guides\u002F7.collect-page-feedback","lucide:thumbs-up","Wrap DuxtPageFeedback, keep the answer where your analytics already live.",{"title":143,"path":144,"stem":145,"icon":146,"description":147},"Brand your site","\u002Fguides\u002Fbrand-your-site","3.guides\u002F8.brand-your-site","lucide:badge-check","Set the name, the wordmark and the icons, so the site reads as yours rather than as the layer's.",{"title":149,"path":150,"stem":151,"children":152},"Reference","\u002Freference","4.reference",[153,157,161,193,197,203,343,490,611,656,716],{"title":149,"path":150,"stem":154,"icon":155,"description":156},"4.reference\u002Findex","lucide:list","The layer's public surface — config keys, frontmatter, components, composables and endpoints.",{"title":20,"path":158,"stem":159,"icon":23,"description":160},"\u002Freference\u002Fconfiguration","4.reference\u002F1.configuration","Every key under duxt in app.config.ts — what it controls, and when it is read.",{"title":162,"path":163,"stem":164,"children":165,"icon":167,"description":168},"Changelog","\u002Freference\u002Fchangelog","4.reference\u002F10.changelog\u002Findex",[166,169,175,181,187],{"title":162,"path":163,"stem":164,"icon":167,"description":168},"lucide:tag","A release log, published as pages — a timeline, a page per release, and a feed.",{"title":170,"path":171,"stem":172,"icon":173,"description":174},"Declaring the section","\u002Freference\u002Fchangelog\u002Fsection","4.reference\u002F10.changelog\u002F1.section","lucide:file-clock","The `changelog` section type — where the file lives, and the two policies it answers.",{"title":176,"path":177,"stem":178,"icon":179,"description":180},"Granularity","\u002Freference\u002Fchangelog\u002Fgranularity","4.reference\u002F10.changelog\u002F2.granularity","lucide:split","A page per release, or the file as the one page it was written as.",{"title":182,"path":183,"stem":184,"icon":185,"description":186},"What is read","\u002Freference\u002Fchangelog\u002Fwhat-is-read","4.reference\u002F10.changelog\u002F3.what-is-read","lucide:scan-text","Which headings become releases, which become groups, and what happens to the rest.",{"title":188,"path":189,"stem":190,"icon":191,"description":192},"Layout and components","\u002Freference\u002Fchangelog\u002Fcomponents","4.reference\u002F10.changelog\u002F4.components","lucide:box","The layout a split history renders in, and the two MDC components its pages are made of.",{"title":47,"path":194,"stem":195,"icon":50,"description":196},"\u002Freference\u002Fsources","4.reference\u002F2.sources","The fields of a source entry, its refs, and the options that shape the URLs.",{"title":198,"path":199,"stem":200,"icon":201,"description":202},"Frontmatter","\u002Freference\u002Ffrontmatter","4.reference\u002F3.frontmatter","lucide:file-code","The fields a page may carry beyond title and description, and the two the build fills in.",{"title":204,"path":205,"stem":206,"children":207,"icon":209,"description":210},"MDC components","\u002Freference\u002Fmdc-components","4.reference\u002F4.mdc-components\u002Findex",[208,211,217,223,229,235,241,247,253,259,297,303,308,314,320,326,332,338],{"title":204,"path":205,"stem":206,"icon":209,"description":210},"lucide:blocks","The blocks a Markdown page can call, one page each, with their props.",{"title":212,"path":213,"stem":214,"icon":215,"description":216},"Callout","\u002Freference\u002Fmdc-components\u002Fcallout","4.reference\u002F4.mdc-components\u002F1.callout","lucide:message-square-warning","An aside the reader is meant to stop at — a tip, a warning, a danger.",{"title":218,"path":219,"stem":220,"icon":221,"description":222},"Package managers","\u002Freference\u002Fmdc-components\u002Fpackage-managers","4.reference\u002F4.mdc-components\u002F10.package-managers","lucide:package","One command, one tab per package manager, remembered across pages.",{"title":224,"path":225,"stem":226,"icon":227,"description":228},"File tree","\u002Freference\u002Fmdc-components\u002Ffile-tree","4.reference\u002F4.mdc-components\u002F11.file-tree","lucide:folder-tree","A folder structure, with icons per file type.",{"title":230,"path":231,"stem":232,"icon":233,"description":234},"Preview","\u002Freference\u002Fmdc-components\u002Fpreview","4.reference\u002F4.mdc-components\u002F12.preview","lucide:eye","A component rendered as the page renders it, with its source beside it.",{"title":236,"path":237,"stem":238,"icon":239,"description":240},"Page cards","\u002Freference\u002Fmdc-components\u002Fpage-cards","4.reference\u002F4.mdc-components\u002F13.page-cards","lucide:layout-grid","A section's children, as cards.",{"title":242,"path":243,"stem":244,"icon":245,"description":246},"Partial","\u002Freference\u002Fmdc-components\u002Fpartial","4.reference\u002F4.mdc-components\u002F14.partial","lucide:puzzle","A block written once and rendered in every source that needs it.",{"title":248,"path":249,"stem":250,"icon":251,"description":252},"Since","\u002Freference\u002Fmdc-components\u002Fsince","4.reference\u002F4.mdc-components\u002F15.since","lucide:milestone","The version something arrived in, beside a heading.",{"title":254,"path":255,"stem":256,"icon":257,"description":258},"Mermaid","\u002Freference\u002Fmdc-components\u002Fmermaid","4.reference\u002F4.mdc-components\u002F16.mermaid","lucide:workflow","A diagram from a fence or a prop.",{"title":260,"path":261,"stem":262,"children":263,"icon":265,"description":266},"Prose overrides","\u002Freference\u002Fmdc-components\u002Fprose","4.reference\u002F4.mdc-components\u002F17.prose\u002Findex",[264,267,273,279,285,291],{"title":260,"path":261,"stem":262,"icon":265,"description":266},"lucide:type","What the layer changes about plain Markdown — links, headings, images, code and tables.",{"title":268,"path":269,"stem":270,"icon":271,"description":272},"ProseA","\u002Freference\u002Fmdc-components\u002Fprose\u002Fprose-a","4.reference\u002F4.mdc-components\u002F17.prose\u002F1.prose-a","lucide:link","A link, resolved against the source it was written in.",{"title":274,"path":275,"stem":276,"icon":277,"description":278},"ProseH2, ProseH3, ProseH4","\u002Freference\u002Fmdc-components\u002Fprose\u002Fprose-headings","4.reference\u002F4.mdc-components\u002F17.prose\u002F2.prose-headings","lucide:heading","Headings, each with a permalink anchor.",{"title":280,"path":281,"stem":282,"icon":283,"description":284},"ProseImg","\u002Freference\u002Fmdc-components\u002Fprose\u002Fprose-img","4.reference\u002F4.mdc-components\u002F17.prose\u002F3.prose-img","lucide:image","An image: theme-aware, and zoomable.",{"title":286,"path":287,"stem":288,"icon":289,"description":290},"ProsePre","\u002Freference\u002Fmdc-components\u002Fprose\u002Fprose-pre","4.reference\u002F4.mdc-components\u002F17.prose\u002F4.prose-pre","lucide:terminal","The code block: filename, language icon, copy button.",{"title":292,"path":293,"stem":294,"icon":295,"description":296},"ProseTable","\u002Freference\u002Fmdc-components\u002Fprose\u002Fprose-table","4.reference\u002F4.mdc-components\u002F17.prose\u002F5.prose-table","lucide:table","A table that scrolls instead of the page.",{"title":298,"path":299,"stem":300,"icon":301,"description":302},"Steps","\u002Freference\u002Fmdc-components\u002Fsteps","4.reference\u002F4.mdc-components\u002F2.steps","lucide:list-ordered","An ordered list drawn as numbered steps on a rail.",{"title":304,"path":305,"stem":306,"icon":201,"description":307},"Code group","\u002Freference\u002Fmdc-components\u002Fcode-group","4.reference\u002F4.mdc-components\u002F3.code-group","Several fences as one tabbed block, labelled by filename.",{"title":309,"path":310,"stem":311,"icon":312,"description":313},"Tab group","\u002Freference\u002Fmdc-components\u002Ftab-group","4.reference\u002F4.mdc-components\u002F4.tab-group","lucide:panels-top-left","Tabs for anything that is not code.",{"title":315,"path":316,"stem":317,"icon":318,"description":319},"Tab","\u002Freference\u002Fmdc-components\u002Ftab","4.reference\u002F4.mdc-components\u002F5.tab","lucide:square","One panel of a tab group.",{"title":321,"path":322,"stem":323,"icon":324,"description":325},"Accordion","\u002Freference\u002Fmdc-components\u002Faccordion","4.reference\u002F4.mdc-components\u002F6.accordion","lucide:chevrons-up-down","Collapsible sections — a FAQ, or answers a reader picks from.",{"title":327,"path":328,"stem":329,"icon":330,"description":331},"Accordion item","\u002Freference\u002Fmdc-components\u002Faccordion-item","4.reference\u002F4.mdc-components\u002F7.accordion-item","lucide:chevron-down","One collapsible section.",{"title":333,"path":334,"stem":335,"icon":336,"description":337},"Field group","\u002Freference\u002Fmdc-components\u002Ffield-group","4.reference\u002F4.mdc-components\u002F8.field-group","lucide:list-tree","A list of fields as one block.",{"title":339,"path":340,"stem":341,"icon":167,"description":342},"Field","\u002Freference\u002Fmdc-components\u002Ffield","4.reference\u002F4.mdc-components\u002F9.field","One parameter, property or option, with its type and default.",{"title":344,"path":345,"stem":346,"children":347,"icon":349,"description":350},"Components","\u002Freference\u002Fcomponents","4.reference\u002F5.components\u002Findex",[348,351,371,412,459],{"title":344,"path":345,"stem":346,"icon":349,"description":350},"lucide:component","The layer's own components, one page each — what each is for, and what it takes.",{"title":352,"path":353,"stem":354,"children":355,"icon":357,"description":358},"Layout","\u002Freference\u002Fcomponents\u002Flayout","4.reference\u002F5.components\u002F1.layout\u002Findex",[356,359,365],{"title":352,"path":353,"stem":354,"icon":357,"description":358},"lucide:layout-panel-top","The two components that frame a page — the navbar and the footer.",{"title":360,"path":361,"stem":362,"icon":363,"description":364},"DuxtHeader","\u002Freference\u002Fcomponents\u002Flayout\u002Fduxt-header","4.reference\u002F5.components\u002F1.layout\u002F1.duxt-header","lucide:panel-top","The navbar: title, navigation, search, and the icon links.",{"title":366,"path":367,"stem":368,"icon":369,"description":370},"DuxtFooter","\u002Freference\u002Fcomponents\u002Flayout\u002Fduxt-footer","4.reference\u002F5.components\u002F1.layout\u002F2.duxt-footer","lucide:panel-bottom","The footer: the site's name, its legal links, and the layer's own line.",{"title":372,"path":373,"stem":374,"children":375,"icon":32,"description":377},"Navigation","\u002Freference\u002Fcomponents\u002Fnavigation","4.reference\u002F5.components\u002F2.navigation\u002Findex",[376,378,384,389,395,401,406],{"title":372,"path":373,"stem":374,"icon":32,"description":377},"Getting around — the section row, the sidebar, the trail, the contents and prev\u002Fnext.",{"title":379,"path":380,"stem":381,"icon":382,"description":383},"DuxtSections","\u002Freference\u002Fcomponents\u002Fnavigation\u002Fduxt-sections","4.reference\u002F5.components\u002F2.navigation\u002F1.duxt-sections","lucide:rows-3","The second navbar row — the top-level parts of the documentation.",{"title":385,"path":386,"stem":387,"icon":336,"description":388},"DuxtNavigation","\u002Freference\u002Fcomponents\u002Fnavigation\u002Fduxt-navigation","4.reference\u002F5.components\u002F2.navigation\u002F2.duxt-navigation","The sidebar tree.",{"title":390,"path":391,"stem":392,"icon":393,"description":394},"DuxtNavigationLink","\u002Freference\u002Fcomponents\u002Fnavigation\u002Fduxt-navigation-link","4.reference\u002F5.components\u002F2.navigation\u002F3.duxt-navigation-link","lucide:link-2","One entry of the sidebar.",{"title":396,"path":397,"stem":398,"icon":399,"description":400},"DuxtBreadcrumb","\u002Freference\u002Fcomponents\u002Fnavigation\u002Fduxt-breadcrumb","4.reference\u002F5.components\u002F2.navigation\u002F4.duxt-breadcrumb","lucide:chevrons-right","The trail above the page title.",{"title":402,"path":403,"stem":404,"icon":155,"description":405},"DuxtToc","\u002Freference\u002Fcomponents\u002Fnavigation\u002Fduxt-toc","4.reference\u002F5.components\u002F2.navigation\u002F5.duxt-toc","The table of contents, and the aside under it.",{"title":407,"path":408,"stem":409,"icon":410,"description":411},"DuxtPageNav","\u002Freference\u002Fcomponents\u002Fnavigation\u002Fduxt-page-nav","4.reference\u002F5.components\u002F2.navigation\u002F6.duxt-page-nav","lucide:arrow-left-right","Previous and next, bounded by the section.",{"title":413,"path":414,"stem":415,"children":416,"icon":418,"description":419},"Controls","\u002Freference\u002Fcomponents\u002Fcontrols","4.reference\u002F5.components\u002F3.controls\u002Findex",[417,420,425,430,436,441,447,453],{"title":413,"path":414,"stem":415,"icon":418,"description":419},"lucide:sliders-horizontal","What a reader operates — search, the switchers, the shortcut sheet, and two indicators.",{"title":421,"path":422,"stem":423,"icon":86,"description":424},"DuxtSearch","\u002Freference\u002Fcomponents\u002Fcontrols\u002Fduxt-search","4.reference\u002F5.components\u002F3.controls\u002F1.duxt-search","Search across every source, ranked together.",{"title":426,"path":427,"stem":428,"icon":38,"description":429},"DuxtVersion","\u002Freference\u002Fcomponents\u002Fcontrols\u002Fduxt-version","4.reference\u002F5.components\u002F3.controls\u002F2.duxt-version","The version badge, and the switcher when there is more than one.",{"title":431,"path":432,"stem":433,"icon":434,"description":435},"DuxtVersionBanner","\u002Freference\u002Fcomponents\u002Fcontrols\u002Fduxt-version-banner","4.reference\u002F5.components\u002F3.controls\u002F3.duxt-version-banner","lucide:triangle-alert","The bar telling a reader this version is not the current one.",{"title":437,"path":438,"stem":439,"icon":92,"description":440},"DuxtLocale","\u002Freference\u002Fcomponents\u002Fcontrols\u002Fduxt-locale","4.reference\u002F5.components\u002F3.controls\u002F4.duxt-locale","The language switcher.",{"title":442,"path":443,"stem":444,"icon":445,"description":446},"DuxtProgress","\u002Freference\u002Fcomponents\u002Fcontrols\u002Fduxt-progress","4.reference\u002F5.components\u002F3.controls\u002F5.duxt-progress","lucide:loader","How far down the page the reader is.",{"title":448,"path":449,"stem":450,"icon":451,"description":452},"DuxtShortcuts","\u002Freference\u002Fcomponents\u002Fcontrols\u002Fduxt-shortcuts","4.reference\u002F5.components\u002F3.controls\u002F6.duxt-shortcuts","lucide:keyboard","The keyboard shortcut sheet, on ?.",{"title":454,"path":455,"stem":456,"icon":457,"description":458},"DuxtSkipLink","\u002Freference\u002Fcomponents\u002Fcontrols\u002Fduxt-skip-link","4.reference\u002F5.components\u002F3.controls\u002F7.duxt-skip-link","lucide:skip-forward","The first focusable element on the page.",{"title":460,"path":461,"stem":462,"children":463,"icon":465,"description":466},"Page","\u002Freference\u002Fcomponents\u002Fpage","4.reference\u002F5.components\u002F4.page\u002Findex",[464,467,473,479,484],{"title":460,"path":461,"stem":462,"icon":465,"description":466},"lucide:file-text","The components that belong to the page itself.",{"title":468,"path":469,"stem":470,"icon":471,"description":472},"DuxtPageInfo","\u002Freference\u002Fcomponents\u002Fpage\u002Fduxt-page-info","4.reference\u002F5.components\u002F4.page\u002F1.duxt-page-info","lucide:git-commit-horizontal","Where the page came from: edit link, last updated, contributors.",{"title":474,"path":475,"stem":476,"icon":477,"description":478},"DuxtCopyPage","\u002Freference\u002Fcomponents\u002Fpage\u002Fduxt-copy-page","4.reference\u002F5.components\u002F4.page\u002F2.duxt-copy-page","lucide:clipboard-copy","Hand this page to a model, or read its source.",{"title":480,"path":481,"stem":482,"icon":140,"description":483},"DuxtPageFeedback","\u002Freference\u002Fcomponents\u002Fpage\u002Fduxt-page-feedback","4.reference\u002F5.components\u002F4.page\u002F3.duxt-page-feedback","Was this page helpful?",{"title":485,"path":486,"stem":487,"icon":488,"description":489},"DuxtCodeBlock","\u002Freference\u002Fcomponents\u002Fpage\u002Fduxt-code-block","4.reference\u002F5.components\u002F4.page\u002F4.duxt-code-block","lucide:code","The card around a code block.",{"title":491,"path":492,"stem":493,"children":494,"icon":496,"description":497},"Composables","\u002Freference\u002Fcomposables","4.reference\u002F6.composables\u002Findex",[495,498,532,561],{"title":491,"path":492,"stem":493,"icon":496,"description":497},"lucide:function-square","The functions the layer exposes to your own components, one page each.",{"title":499,"path":500,"stem":501,"children":502,"icon":62,"description":504},"Config and content","\u002Freference\u002Fcomposables\u002Fconfig-and-content","4.reference\u002F6.composables\u002F1.config-and-content\u002Findex",[503,505,510,516,521,527],{"title":499,"path":500,"stem":501,"icon":62,"description":504},"The merged config, and which collection serves the page being read.",{"title":506,"path":507,"stem":508,"icon":23,"description":509},"useDuxtConfig()","\u002Freference\u002Fcomposables\u002Fconfig-and-content\u002Fuse-duxt-config","4.reference\u002F6.composables\u002F1.config-and-content\u002F1.use-duxt-config","The merged config, every text field already resolved.",{"title":511,"path":512,"stem":513,"icon":514,"description":515},"useDuxtCollection()","\u002Freference\u002Fcomposables\u002Fconfig-and-content\u002Fuse-duxt-collection","4.reference\u002F6.composables\u002F1.config-and-content\u002F2.use-duxt-collection","lucide:library","Which collection serves this route.",{"title":517,"path":518,"stem":519,"icon":336,"description":520},"useDuxtNavigation()","\u002Freference\u002Fcomposables\u002Fconfig-and-content\u002Fuse-duxt-navigation","4.reference\u002F6.composables\u002F1.config-and-content\u002F3.use-duxt-navigation","The navigation tree for the collection serving this route.",{"title":522,"path":523,"stem":524,"icon":525,"description":526},"useDuxtSection()","\u002Freference\u002Fcomposables\u002Fconfig-and-content\u002Fuse-duxt-section","4.reference\u002F6.composables\u002F1.config-and-content\u002F4.use-duxt-section","lucide:folder-open","The part of the documentation this page is in.",{"title":528,"path":529,"stem":530,"icon":399,"description":531},"useDuxtBreadcrumb()","\u002Freference\u002Fcomposables\u002Fconfig-and-content\u002Fuse-duxt-breadcrumb","4.reference\u002F6.composables\u002F1.config-and-content\u002F5.use-duxt-breadcrumb","The trail from the section down to a page.",{"title":533,"path":534,"stem":535,"children":536,"icon":538,"description":539},"Paths and versions","\u002Freference\u002Fcomposables\u002Fpaths-and-versions","4.reference\u002F6.composables\u002F2.paths-and-versions\u002Findex",[537,540,545,550,555],{"title":533,"path":534,"stem":535,"icon":538,"description":539},"lucide:route","Reading a URL, writing one back out, and knowing which version is being read.",{"title":541,"path":542,"stem":543,"icon":251,"description":544},"useDuxtPath()","\u002Freference\u002Fcomposables\u002Fpaths-and-versions\u002Fuse-duxt-path","4.reference\u002F6.composables\u002F2.paths-and-versions\u002F1.use-duxt-path","The path the documentation is at, locale stripped.",{"title":546,"path":547,"stem":548,"icon":271,"description":549},"useDuxtLink()","\u002Freference\u002Fcomposables\u002Fpaths-and-versions\u002Fuse-duxt-link","4.reference\u002F6.composables\u002F2.paths-and-versions\u002F2.use-duxt-link","A documentation path, written back out as a link.",{"title":551,"path":552,"stem":553,"icon":38,"description":554},"useDuxtVersion()","\u002Freference\u002Fcomposables\u002Fpaths-and-versions\u002Fuse-duxt-version","4.reference\u002F6.composables\u002F2.paths-and-versions\u002F3.use-duxt-version","What the switcher shows, what the banner says, whether to index.",{"title":556,"path":557,"stem":558,"icon":559,"description":560},"useDuxtSiteUrl()","\u002Freference\u002Fcomposables\u002Fpaths-and-versions\u002Fuse-duxt-site-url","4.reference\u002F6.composables\u002F2.paths-and-versions\u002F4.use-duxt-site-url","lucide:globe","The configured origin, and paths made absolute.",{"title":562,"path":563,"stem":564,"children":565,"icon":101,"description":567},"Reading experience","\u002Freference\u002Fcomposables\u002Freading","4.reference\u002F6.composables\u002F3.reading\u002Findex",[566,568,572,578,583,589,595,600,606],{"title":562,"path":563,"stem":564,"icon":101,"description":567},"Search, headings, focus, history, and the choices a reader makes.",{"title":569,"path":570,"stem":571,"icon":86,"description":424},"useDuxtSearch()","\u002Freference\u002Fcomposables\u002Freading\u002Fuse-duxt-search","4.reference\u002F6.composables\u002F3.reading\u002F1.use-duxt-search",{"title":573,"path":574,"stem":575,"icon":576,"description":577},"useFuzzySearch()","\u002Freference\u002Fcomposables\u002Freading\u002Fuse-fuzzy-search","4.reference\u002F6.composables\u002F3.reading\u002F2.use-fuzzy-search","lucide:spell-check","Typo tolerance beside the exact index.",{"title":579,"path":580,"stem":581,"icon":277,"description":582},"useActiveHeading()","\u002Freference\u002Fcomposables\u002Freading\u002Fuse-active-heading","4.reference\u002F6.composables\u002F3.reading\u002F3.use-active-heading","The heading currently in view.",{"title":584,"path":585,"stem":586,"icon":587,"description":588},"useDuxtPageFocus()","\u002Freference\u002Fcomposables\u002Freading\u002Fuse-duxt-page-focus","4.reference\u002F6.composables\u002F3.reading\u002F4.use-duxt-page-focus","lucide:focus","Moves focus to the heading after a client-side navigation.",{"title":590,"path":591,"stem":592,"icon":593,"description":594},"useRecentPages()","\u002Freference\u002Fcomposables\u002Freading\u002Fuse-recent-pages","4.reference\u002F6.composables\u002F3.reading\u002F5.use-recent-pages","lucide:history","The last five pages this reader opened.",{"title":596,"path":597,"stem":598,"icon":221,"description":599},"usePackageManager()","\u002Freference\u002Fcomposables\u002Freading\u002Fuse-package-manager","4.reference\u002F6.composables\u002F3.reading\u002F6.use-package-manager","The package manager a reader picked.",{"title":601,"path":602,"stem":603,"icon":604,"description":605},"useDuxtToast()","\u002Freference\u002Fcomposables\u002Freading\u002Fuse-duxt-toast","4.reference\u002F6.composables\u002F3.reading\u002F7.use-duxt-toast","lucide:bell","Notifications, wrapped so no component imports the library.",{"title":607,"path":608,"stem":609,"icon":451,"description":610},"useDuxtShortcuts()","\u002Freference\u002Fcomposables\u002Freading\u002Fuse-duxt-shortcuts","4.reference\u002F6.composables\u002F3.reading\u002F8.use-duxt-shortcuts","The keys the theme listens to.",{"title":612,"path":613,"stem":614,"children":615,"icon":538,"description":617},"Endpoints","\u002Freference\u002Fendpoints","4.reference\u002F7.endpoints\u002Findex",[616,618,623,629,634,639,644,650],{"title":612,"path":613,"stem":614,"icon":538,"description":617},"Everything the site serves besides pages, one page each.",{"title":619,"path":620,"stem":621,"icon":465,"description":622},"\u002Fllms.txt","\u002Freference\u002Fendpoints\u002Fllms-txt","4.reference\u002F7.endpoints\u002F1.llms-txt","The documentation as a Markdown index, per llmstxt.org.",{"title":624,"path":625,"stem":626,"icon":627,"description":628},"\u002Fllms-full.txt","\u002Freference\u002Fendpoints\u002Fllms-full-txt","4.reference\u002F7.endpoints\u002F2.llms-full-txt","lucide:file-stack","The same pages, whole, in one Markdown file.",{"title":630,"path":631,"stem":632,"icon":201,"description":633},"\u003Cpage>.md","\u002Freference\u002Fendpoints\u002Fpage-markdown","4.reference\u002F7.endpoints\u002F3.page-markdown","Any page source, at its own URL plus .md.",{"title":635,"path":636,"stem":637,"icon":80,"description":638},"\u002Fmcp","\u002Freference\u002Fendpoints\u002Fmcp","4.reference\u002F7.endpoints\u002F4.mcp","An MCP server over the same content.",{"title":640,"path":641,"stem":642,"icon":86,"description":643},"\u002Fsitemap.xml and \u002Frobots.txt","\u002Freference\u002Fendpoints\u002Fsitemap-and-robots","4.reference\u002F7.endpoints\u002F5.sitemap-and-robots","What a crawler is pointed at, and what it is kept out of.",{"title":645,"path":646,"stem":647,"icon":648,"description":649},"\u002Frss.xml","\u002Freference\u002Fendpoints\u002Frss-xml","4.reference\u002F7.endpoints\u002F6.rss-xml","lucide:rss","The feed, once a section is named.",{"title":651,"path":652,"stem":653,"icon":654,"description":655},"\u002F_duxt\u002Fdevtools","\u002Freference\u002Fendpoints\u002Fdevtools","4.reference\u002F7.endpoints\u002F7.devtools","lucide:wrench","The route the Nuxt Devtools panel is served from. Dev only.",{"title":657,"path":658,"stem":659,"children":660,"icon":654,"description":662},"Devtools","\u002Freference\u002Fdevtools","4.reference\u002F8.devtools\u002Findex",[661,663,667,672,677,683,689,695,700,705,710],{"title":657,"path":658,"stem":659,"icon":654,"description":662},"Ten panels that show what your sources became. Dev only.",{"title":47,"path":664,"stem":665,"icon":514,"description":666},"\u002Freference\u002Fdevtools\u002Fsources","4.reference\u002F8.devtools\u002F1.sources","What `duxt.sources` became — one collection per source, version and language.",{"title":668,"path":669,"stem":670,"icon":128,"description":671},"Redirects","\u002Freference\u002Fdevtools\u002Fredirects","4.reference\u002F8.devtools\u002F10.redirects","Every redirect the server ships, and which of them the layer wrote.",{"title":673,"path":674,"stem":675,"icon":538,"description":676},"Paths","\u002Freference\u002Fdevtools\u002Fpaths","4.reference\u002F8.devtools\u002F2.paths","Paste a URL, see which source claims it and what it finds there.",{"title":678,"path":679,"stem":680,"icon":681,"description":682},"Pages","\u002Freference\u002Fdevtools\u002Fpages","4.reference\u002F8.devtools\u002F3.pages","lucide:files","Every page of every collection, with its frontmatter and git metadata.",{"title":684,"path":685,"stem":686,"icon":687,"description":688},"Versions","\u002Freference\u002Fdevtools\u002Fversions","4.reference\u002F8.devtools\u002F4.versions","lucide:columns-3","Which version — and which language — carries which page.",{"title":690,"path":691,"stem":692,"icon":693,"description":694},"Checks","\u002Freference\u002Fdevtools\u002Fchecks","4.reference\u002F8.devtools\u002F5.checks","lucide:check-check","The build validator, run against what the site is serving now.",{"title":696,"path":697,"stem":698,"icon":86,"description":699},"Search","\u002Freference\u002Fdevtools\u002Fsearch","4.reference\u002F8.devtools\u002F6.search","What the search index holds, through the same query the dialog runs.",{"title":701,"path":702,"stem":703,"icon":418,"description":704},"Config","\u002Freference\u002Fdevtools\u002Fconfig","4.reference\u002F8.devtools\u002F7.config","The merged `duxt` config, and which side of the merge each value came from.",{"title":706,"path":707,"stem":708,"icon":92,"description":709},"i18n","\u002Freference\u002Fdevtools\u002Fi18n","4.reference\u002F8.devtools\u002F8.i18n","Message keys per locale, against the base language.",{"title":711,"path":712,"stem":713,"icon":714,"description":715},"Cache","\u002Freference\u002Fdevtools\u002Fcache","4.reference\u002F8.devtools\u002F9.cache","lucide:hard-drive","Content's download cache, and a way to drop one entry.",{"title":717,"path":718,"stem":719,"children":720,"icon":722,"description":723},"API reference","\u002Freference\u002Fopenapi","4.reference\u002F9.openapi\u002Findex",[721,724,728,732,738],{"title":717,"path":718,"stem":719,"icon":722,"description":723},"lucide:plug","An OpenAPI document, published as reference pages with a client that sends real requests.",{"title":170,"path":725,"stem":726,"icon":201,"description":727},"\u002Freference\u002Fopenapi\u002Fsection","4.reference\u002F9.openapi\u002F1.section","The `openapi` section type — where the document lives, and what it becomes.",{"title":344,"path":729,"stem":730,"icon":191,"description":731},"\u002Freference\u002Fopenapi\u002Fcomponents","4.reference\u002F9.openapi\u002F2.components","The three MDC components a generated reference page is made of.",{"title":733,"path":734,"stem":735,"icon":736,"description":737},"The try-it client","\u002Freference\u002Fopenapi\u002Ftry-it","4.reference\u002F9.openapi\u002F3.try-it","lucide:send","A real request, sent by the reader's own browser.",{"title":739,"path":740,"stem":741,"icon":488,"description":742},"Request samples","\u002Freference\u002Fopenapi\u002Frequest-samples","4.reference\u002F9.openapi\u002F4.request-samples","The same request in twelve clients, and how to add your own.",{"title":744,"path":745,"stem":746,"children":747,"icon":749,"description":750},"Credits","\u002Fcredits","5.credits\u002Findex",[748],{"title":744,"path":745,"stem":746,"icon":749,"description":750},"lucide:heart","What duxt is built on, and what it was built after.",{"title":752,"path":753,"stem":754,"children":755},"Conventions","\u002Fconventions","6.conventions",[756,760,766],{"title":752,"path":753,"stem":757,"icon":758,"description":759},"6.conventions\u002Findex","lucide:ruler","Project-specific rules — the ones a reader could not infer from the code.",{"title":761,"path":762,"stem":763,"icon":764,"description":765},"Branding","\u002Fconventions\u002Fbranding","6.conventions\u002F1.branding","lucide:shapes","The [d]uxt mark — where each asset is used, why the icon's brackets are redrawn, and the colours that are fixed.",{"title":767,"path":768,"stem":769,"icon":283,"description":770},"Icons","\u002Fconventions\u002Ficons","6.conventions\u002F2.icons","Four icon sets, and the one question that decides which of them draws a given mark.",{"title":772,"path":773,"stem":774,"children":775},"Architecture decisions","\u002Fadr","99.adr",[776,780,786,791,796,801,806,811,816,821],{"title":772,"path":773,"stem":777,"icon":778,"description":779},"99.adr\u002Findex","lucide:gavel","The decision log — every architecture decision recorded for duxt.",{"title":781,"path":782,"stem":783,"icon":784,"description":785},"Build duxt as a layer carrying a module","\u002Fadr\u002F0001-build-duxt-as-a-layer-carrying-a-module","99.adr\u002F0001-build-duxt-as-a-layer-carrying-a-module",null,"Distribute the theme as a Nuxt layer whose root is the package, rather than as a starter template.",{"title":787,"path":788,"stem":789,"icon":784,"description":790},"Generate the collections from one source list","\u002Fadr\u002F0002-generate-the-collections-from-one-source-list","99.adr\u002F0002-generate-the-collections-from-one-source-list","Compute Content collections from a compact sources list at config load time instead of having consumers declare them.",{"title":792,"path":793,"stem":794,"icon":784,"description":795},"Decide the URL prefixes at build time","\u002Fadr\u002F0003-decide-the-url-prefixes-at-build-time","99.adr\u002F0003-decide-the-url-prefixes-at-build-time","Whether a repository or version segment appears is settled by the source list before the first request, never per request.",{"title":797,"path":798,"stem":799,"icon":784,"description":800},"Render Markdown components with MDC","\u002Fadr\u002F0004-render-markdown-components-with-mdc","99.adr\u002F0004-render-markdown-components-with-mdc","Use Content's own MDC syntax for components inside Markdown rather than adopting MDX.",{"title":802,"path":803,"stem":804,"icon":784,"description":805},"Ship the layer without owner-specific links","\u002Fadr\u002F0005-ship-the-layer-without-owner-specific-links","99.adr\u002F0005-ship-the-layer-without-owner-specific-links","Every default that would name a specific project — repository, issue tracker, community, imprint — ships empty.",{"title":807,"path":808,"stem":809,"icon":784,"description":810},"Rebuild on a schedule rather than refresh at runtime","\u002Fadr\u002F0006-rebuild-on-a-schedule-rather-than-refresh-at-runtime","99.adr\u002F0006-rebuild-on-a-schedule-rather-than-refresh-at-runtime","A site reading another repository picks up its changes when it builds, and no runtime refresh is offered.",{"title":812,"path":813,"stem":814,"icon":784,"description":815},"Serve translations as collections of their own","\u002Fadr\u002F0007-serve-translations-as-collections-of-their-own","99.adr\u002F0007-serve-translations-as-collections-of-their-own","Add a locale dimension to a source rather than a locale segment to the content path.",{"title":817,"path":818,"stem":819,"icon":784,"description":820},"Build the theme on owned shadcn-vue components","\u002Fadr\u002F0008-build-the-theme-on-owned-shadcn-vue-components","99.adr\u002F0008-build-the-theme-on-owned-shadcn-vue-components","The layer holds the source of its interface components rather than importing them from a component library or a ready-made documentation theme.",{"title":822,"path":823,"stem":824,"icon":784,"description":825},"Take the SEO stack from the Nuxt SEO bundle","\u002Fadr\u002F0009-take-the-seo-stack-from-the-nuxt-seo-bundle","99.adr\u002F0009-take-the-seo-stack-from-the-nuxt-seo-bundle","The layer installs @nuxtjs\u002Fseo and hands it the head tags and structured data it used to write by hand, keeping only the rules that depend on versions and translations.",{"title":827,"path":828,"stem":829,"icon":830,"description":831},"Documentation","\u002F","index","lucide:book-open-text","A Nuxt layer that turns a repository's docs folder into a versioned, multi-repo documentation site.",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":836},0,24,false,"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z\"\u002F>\u003Cpath d=\"m3.3 7l8.7 5l8.7-5M12 22V12\"\u002F>\u003C\u002Fg>",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":838},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09\"\u002F>\u003Cpath d=\"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z\"\u002F>\u003Cpath d=\"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05\"\u002F>\u003C\u002Fg>",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":840},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Ccircle cx=\"12\" cy=\"12\" r=\"10\"\u002F>\u003Cpath d=\"m16.24 7.76l-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z\"\u002F>\u003C\u002Fg>",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":842},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M12 5v16m8.001-2A2 2 0 0 0 22 17V5a2 2 0 0 0-1.999-2L16 3.002A5 5 0 0 0 12 5a5 5 0 0 0-4-2H4a2 2 0 0 0-2 2v12a2 2 0 0 0 1.999 2H8a5 5 0 0 1 4 2a5 5 0 0 1 4-2z\"\u002F>",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":844},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Zm-6.8-2.8l2-2m-5-1l2-2m-5-1l2-2m7 11l2-2\"\u002F>",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":846},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m14 13l-8.381 8.38a1 1 0 0 1-3.001-3l8.384-8.381M16 16l6-6m-.5.5l-8-8M8 8l6-6M8.5 7.5l8 8\"\u002F>",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":848},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M3 5h.01M3 12h.01M3 19h.01M8 5h13M8 12h13M8 19h13\"\u002F>",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":850},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"M9.671 4.136a2.34 2.34 0 0 1 4.659 0a2.34 2.34 0 0 0 3.319 1.915a2.34 2.34 0 0 1 2.33 4.033a2.34 2.34 0 0 0 0 3.831a2.34 2.34 0 0 1-2.33 4.033a2.34 2.34 0 0 0-3.319 1.915a2.34 2.34 0 0 1-4.659 0a2.34 2.34 0 0 0-3.32-1.915a2.34 2.34 0 0 1-2.33-4.033a2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915\"\u002F>\u003Ccircle cx=\"12\" cy=\"12\" r=\"3\"\u002F>\u003C\u002Fg>",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":852},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z\"\u002F>\u003Ccircle cx=\"7.5\" cy=\"7.5\" r=\".5\" fill=\"currentColor\"\u002F>\u003C\u002Fg>",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":854},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"M15 6a9 9 0 0 0-9 9V3\"\u002F>\u003Ccircle cx=\"18\" cy=\"6\" r=\"3\"\u002F>\u003Ccircle cx=\"6\" cy=\"18\" r=\"3\"\u002F>\u003C\u002Fg>",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":856},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2\"\u002F>\u003Crect width=\"8\" height=\"8\" x=\"14\" y=\"2\" rx=\"1\"\u002F>\u003C\u002Fg>",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":858},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M15.536 11.293a1 1 0 0 0 0 1.414l2.376 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0zm-13.239 0a1 1 0 0 0 0 1.414l2.377 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414L6.088 8.916a1 1 0 0 0-1.414 0zm6.619 6.619a1 1 0 0 0 0 1.415l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.415l-2.377-2.376a1 1 0 0 0-1.414 0zm0-13.238a1 1 0 0 0 0 1.414l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z\"\u002F>",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":860},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Crect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" ry=\"2\"\u002F>\u003Cpath d=\"M9 17c2 0 2.8-1 2.8-2.8V10c0-2 1-3.3 3.2-3m-6 4.2h5.7\"\u002F>\u003C\u002Fg>",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":862},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Ccircle cx=\"6\" cy=\"19\" r=\"3\"\u002F>\u003Cpath d=\"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15\"\u002F>\u003Ccircle cx=\"18\" cy=\"5\" r=\"3\"\u002F>\u003C\u002Fg>",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":864},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z\"\u002F>",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":866},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m9 18l6-6l-6-6\"\u002F>",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":868},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M12 22v-5m3-9V2m2 6a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1zM9 8V2\"\u002F>",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":870},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\"\u002F>\u003Cpath d=\"M14 2v5a1 1 0 0 0 1 1h5m-10 4.5L8 15l2 2.5m4-5l2 2.5l-2 2.5\"\u002F>\u003C\u002Fg>",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":872},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11zm7.318-19.539l-10.94 10.939\"\u002F>",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":874},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m16 18l6-6l-6-6M8 6l-6 6l6 6\"\u002F>",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":876},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4 5h16M4 12h16M4 19h16\"\u002F>",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":878},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m6 9l6 6l6-6\"\u002F>",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":880},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"m21 21l-4.34-4.34\"\u002F>\u003Ccircle cx=\"11\" cy=\"11\" r=\"8\"\u002F>\u003C\u002Fg>",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":882},"\u003Cpath fill=\"currentColor\" d=\"M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12\"\u002F>",{"left":833,"top":833,"width":884,"height":885,"rotate":833,"vFlip":835,"hFlip":835,"body":886},640,480,"\u003Cpath fill=\"#012169\" d=\"M0 0h640v480H0z\"\u002F>\u003Cpath fill=\"#fff\" d=\"m75 0l244 181L562 0h78v62L400 241l240 178v61h-80L320 301L81 480H0v-60l239-178L0 64V0z\"\u002F>\u003Cpath fill=\"#c8102e\" d=\"m424 281l216 159v40L369 281zm-184 20l6 35L54 480H0zM640 0v3L391 191l2-44L590 0zM0 0l239 176h-60L0 42z\"\u002F>\u003Cpath fill=\"#fff\" d=\"M241 0v480h160V0zM0 160v160h640V160z\"\u002F>\u003Cpath fill=\"#c8102e\" d=\"M0 193v96h640v-96zM273 0v480h96V0z\"\u002F>",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":888},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401\"\u002F>",{"page":890,"from":1618,"asked":1618},{"id":891,"title":739,"body":892,"compare":784,"contributors":1608,"date":784,"description":742,"extension":1611,"icon":488,"lastUpdated":1612,"layout":784,"meta":1613,"navigation":835,"path":740,"rawbody":1614,"redirectFrom":784,"seo":1615,"sitemap":1616,"stem":741,"__hash__":1617},"docs\u002F4.reference\u002F9.openapi\u002F4.request-samples.md",{"type":893,"value":894,"toc":1597},"minimark",[895,899,904,983,998,1002,1005,1009,1079,1118,1125,1129,1132,1266,1355,1375,1380,1402,1408,1425,1429,1435,1442,1446,1449,1456,1460,1474,1550,1557,1560,1590,1593],[896,897,898],"p",{},"Beside the client, the request the reader has built — written out in the language\nthey work in, and rewritten on every keystroke.",[900,901,903],"h2",{"id":902},"what-ships","What ships",[905,906,907,921],"table",{},[908,909,910],"thead",{},[911,912,913,918],"tr",{},[914,915,917],"th",{"align":916},"left","Group",[914,919,920],{"align":916},"Clients",[922,923,924,935,953,961,971],"tbody",{},[911,925,926,933],{},[927,928,929],"td",{"align":916},[930,931,932],"code",{},"curl",[927,934,932],{"align":916},[911,936,937,940],{},[927,938,939],{"align":916},"TypeScript",[927,941,942,945,946,945,949,952],{"align":916},[930,943,944],{},"fetch",", ",[930,947,948],{},"$fetch",[930,950,951],{},"useFetch",", axios",[911,954,955,958],{},[927,956,957],{"align":916},"Python",[927,959,960],{"align":916},"requests, httpx, urllib",[911,962,963,966],{},[927,964,965],{"align":916},"Go",[927,967,968],{"align":916},[930,969,970],{},"net\u002Fhttp",[911,972,973,976],{},[927,974,975],{"align":916},"PHP",[927,977,978,979,982],{"align":916},"Guzzle, Laravel ",[930,980,981],{},"Http",", curl extension",[896,984,985,989,990,945,992,994,995,997],{},[986,987,988],"strong",{},"Seven are on by default:"," curl, ",[930,991,944],{},[930,993,948],{},", Python requests, Go, Guzzle\nand Laravel ",[930,996,981],{},". The other five are the second client for a language that\nalready has one on screen, and a picker is for choosing rather than for listing\neverything that exists.",[900,999,1001],{"id":1000},"two-levels","Two levels",[896,1003,1004],{},"The language is the tab and the client a select inside it, so PHP with three\nclients costs one tab. A site adding three of its own for one language still\ncosts one. The reader's choice is remembered across pages — a reader who works in\ncurl works in curl on the next endpoint too.",[900,1006,1008],{"id":1007},"configuring-the-list","Configuring the list",[1010,1011,1016],"pre",{"className":1012,"code":1013,"language":1014,"meta":1015,"style":1015},"language-ts shiki shiki-themes github-light github-dark","export default defineAppConfig({\n  duxt: {\n    requestSamples: ['curl', 'php-guzzle', 'php-laravel']\n  }\n})\n","ts","",[930,1017,1018,1038,1044,1067,1073],{"__ignoreMap":1015},[1019,1020,1023,1027,1030,1034],"span",{"class":1021,"line":1022},"line",1,[1019,1024,1026],{"class":1025},"szBVR","export",[1019,1028,1029],{"class":1025}," default",[1019,1031,1033],{"class":1032},"sScJk"," defineAppConfig",[1019,1035,1037],{"class":1036},"sVt8B","({\n",[1019,1039,1041],{"class":1021,"line":1040},2,[1019,1042,1043],{"class":1036},"  duxt: {\n",[1019,1045,1047,1050,1054,1056,1059,1061,1064],{"class":1021,"line":1046},3,[1019,1048,1049],{"class":1036},"    requestSamples: [",[1019,1051,1053],{"class":1052},"sZZnC","'curl'",[1019,1055,945],{"class":1036},[1019,1057,1058],{"class":1052},"'php-guzzle'",[1019,1060,945],{"class":1036},[1019,1062,1063],{"class":1052},"'php-laravel'",[1019,1065,1066],{"class":1036},"]\n",[1019,1068,1070],{"class":1021,"line":1069},4,[1019,1071,1072],{"class":1036},"  }\n",[1019,1074,1076],{"class":1021,"line":1075},5,[1019,1077,1078],{"class":1036},"})\n",[896,1080,1081,1082,945,1084,945,1086,1089,1090,945,1093,945,1096,945,1099,945,1102,945,1105,1089,1108,945,1111,945,1114,1117],{},"A string picks one that ships; the ids are ",[930,1083,932],{},[930,1085,944],{},[930,1087,1088],{},"ofetch",",\n",[930,1091,1092],{},"use-fetch",[930,1094,1095],{},"axios",[930,1097,1098],{},"python-requests",[930,1100,1101],{},"python-httpx",[930,1103,1104],{},"python-urllib",[930,1106,1107],{},"go",[930,1109,1110],{},"php-guzzle",[930,1112,1113],{},"php-laravel",[930,1115,1116],{},"php-curl",".",[896,1119,1120,1121,1124],{},"The list ",[986,1122,1123],{},"replaces"," rather than extends, like every other list in the config:\notherwise a site documenting a PHP API could add its clients but never drop the\nones it does not want. The order is the order they appear in.",[900,1126,1128],{"id":1127},"your-own-generator","Your own generator",[896,1130,1131],{},"An object adds one of your own — or replaces one that ships, by reusing its id.",[1010,1133,1135],{"className":1012,"code":1134,"language":1014,"meta":1015,"style":1015},"requestSamples: [\n  'curl',\n  {\n    id: 'ruby',\n    group: 'Ruby',\n    label: 'Net::HTTP',\n    language: 'ruby',\n    generate: (request) => `\nuri = URI('${request.url}')\nNet::HTTP.get(uri)\n`.trim()\n  }\n]\n",[930,1136,1137,1145,1152,1157,1167,1177,1188,1198,1220,1236,1242,1256,1261],{"__ignoreMap":1015},[1019,1138,1139,1142],{"class":1021,"line":1022},[1019,1140,1141],{"class":1032},"requestSamples",[1019,1143,1144],{"class":1036},": [\n",[1019,1146,1147,1150],{"class":1021,"line":1040},[1019,1148,1149],{"class":1052},"  'curl'",[1019,1151,1089],{"class":1036},[1019,1153,1154],{"class":1021,"line":1046},[1019,1155,1156],{"class":1036},"  {\n",[1019,1158,1159,1162,1165],{"class":1021,"line":1069},[1019,1160,1161],{"class":1036},"    id: ",[1019,1163,1164],{"class":1052},"'ruby'",[1019,1166,1089],{"class":1036},[1019,1168,1169,1172,1175],{"class":1021,"line":1075},[1019,1170,1171],{"class":1036},"    group: ",[1019,1173,1174],{"class":1052},"'Ruby'",[1019,1176,1089],{"class":1036},[1019,1178,1180,1183,1186],{"class":1021,"line":1179},6,[1019,1181,1182],{"class":1036},"    label: ",[1019,1184,1185],{"class":1052},"'Net::HTTP'",[1019,1187,1089],{"class":1036},[1019,1189,1191,1194,1196],{"class":1021,"line":1190},7,[1019,1192,1193],{"class":1036},"    language: ",[1019,1195,1164],{"class":1052},[1019,1197,1089],{"class":1036},[1019,1199,1201,1204,1207,1211,1214,1217],{"class":1021,"line":1200},8,[1019,1202,1203],{"class":1032},"    generate",[1019,1205,1206],{"class":1036},": (",[1019,1208,1210],{"class":1209},"s4XuR","request",[1019,1212,1213],{"class":1036},") ",[1019,1215,1216],{"class":1025},"=>",[1019,1218,1219],{"class":1052}," `\n",[1019,1221,1223,1226,1228,1230,1233],{"class":1021,"line":1222},9,[1019,1224,1225],{"class":1052},"uri = URI('${",[1019,1227,1210],{"class":1036},[1019,1229,1117],{"class":1052},[1019,1231,1232],{"class":1036},"url",[1019,1234,1235],{"class":1052},"}')\n",[1019,1237,1239],{"class":1021,"line":1238},10,[1019,1240,1241],{"class":1052},"Net::HTTP.get(uri)\n",[1019,1243,1245,1248,1250,1253],{"class":1021,"line":1244},11,[1019,1246,1247],{"class":1052},"`",[1019,1249,1117],{"class":1036},[1019,1251,1252],{"class":1032},"trim",[1019,1254,1255],{"class":1036},"()\n",[1019,1257,1259],{"class":1021,"line":1258},12,[1019,1260,1072],{"class":1036},[1019,1262,1264],{"class":1021,"line":1263},13,[1019,1265,1066],{"class":1036},[905,1267,1268,1280],{},[908,1269,1270],{},[911,1271,1272,1274,1277],{},[914,1273,339],{"align":916},[914,1275,1276],{"align":916},"Type",[914,1278,1279],{"align":916},"Notes",[922,1281,1282,1297,1312,1326,1340],{},[911,1283,1284,1289,1294],{},[927,1285,1286],{"align":916},[930,1287,1288],{},"id",[927,1290,1291],{"align":916},[930,1292,1293],{},"string",[927,1295,1296],{"align":916},"Stable: it is also the remembered value",[911,1298,1299,1304,1309],{},[927,1300,1301],{"align":916},[930,1302,1303],{},"group",[927,1305,1306],{"align":916},[930,1307,1308],{},"DuxtText",[927,1310,1311],{"align":916},"The tab",[911,1313,1314,1319,1323],{},[927,1315,1316],{"align":916},[930,1317,1318],{},"label",[927,1320,1321],{"align":916},[930,1322,1308],{},[927,1324,1325],{"align":916},"The entry inside the tab",[911,1327,1328,1333,1337],{},[927,1329,1330],{"align":916},[930,1331,1332],{},"language",[927,1334,1335],{"align":916},[930,1336,1293],{},[927,1338,1339],{"align":916},"A Shiki id — it decides the grammar",[911,1341,1342,1347,1352],{},[927,1343,1344],{"align":916},[930,1345,1346],{},"generate",[927,1348,1349],{"align":916},[930,1350,1351],{},"(request) => string",[927,1353,1354],{"align":916},"Synchronous, pure, no network, no DOM",[896,1356,1357,1359,1360,1363,1364,1366,1367,1370,1371,1374],{},[930,1358,1346],{}," runs in the ",[986,1361,1362],{},"browser",", on every keystroke, because the sample has to\nfollow the request being edited. ",[930,1365,1210],{}," is ",[930,1368,1369],{},"{ method, url, headers, body?, responseType? }",",\nwhere ",[930,1372,1373],{},"body"," is the editor's text and not parsed — a generator that wants it as\ndata parses it itself, and gets to decide what to do when it is not JSON.",[1376,1377,1379],"h3",{"id":1378},"why-typescript-and-not-javascript","Why TypeScript and not JavaScript",[896,1381,1382,945,1384,1386,1387,1390,1391,1394,1395,1397,1398,1401],{},[930,1383,948],{},[930,1385,951],{}," and axios all take the response shape as a type parameter,\nand ",[930,1388,1389],{},"responseType"," is what fills it: ",[930,1392,1393],{},"$fetch\u003CWidget>(…)"," is the line somebody\nactually writes. ",[930,1396,944],{}," has none — it returns a ",[930,1399,1400],{},"Response"," whatever the body\nturns out to be — so its sample is the same in either language.",[896,1403,1404,1405,1407],{},"That is also why there is one group and not two. A JavaScript group beside this\none would carry a ",[930,1406,944],{}," that never differs and three clients that differ only\nwhere the document named its response schema, for twice the tabs.",[896,1409,1410,1412,1413,1416,1417,1420,1421,1424],{},[930,1411,1389],{}," is the component name of what a successful response returns —\n",[930,1414,1415],{},"Widget",", or ",[930,1418,1419],{},"Widget[]"," for a list. It is absent where the response schema is\ninline rather than a ",[930,1422,1423],{},"$ref",", and a sample then simply has no type parameter:\nnothing here invents a name the document did not give.",[900,1426,1428],{"id":1427},"what-a-sample-shows","What a sample shows",[896,1430,1431,1434],{},[986,1432,1433],{},"The request, and nothing after it."," The response is already on screen in the\npanel below the editor, so a sample that fetched it a second time would be showing\nthe reader something they can see — at the cost of an error branch in every\nlanguage that has one.",[896,1436,1437,1438,1441],{},"Go is the exception and keeps its ",[930,1439,1440],{},"err"," checks: without them it is not Go, and a\nsnippet that does not compile is worse than a long one.",[900,1443,1445],{"id":1444},"grammars-are-paid-for-not-assumed","Grammars are paid for, not assumed",[896,1447,1448],{},"These samples are coloured in the browser, so every language is bytes a reader\ndownloads — unlike a Markdown fence, whose grammar is a build-time cost and never\nreaches a browser at all.",[896,1450,1451,1452,1455],{},"So the grammar set is ",[986,1453,1454],{},"generated from the list above",": a site ships exactly the\nlanguages its samples name. The default seven need six grammars. Loading Shiki's\nown lazy map instead would cost 3 KB and make every build emit 242 grammar\nchunks.",[900,1457,1459],{"id":1458},"samples-from-the-document","Samples from the document",[896,1461,1462,1465,1466,1469,1470,1473],{},[930,1463,1464],{},"x-codeSamples"," — under either spelling, the older ",[930,1467,1468],{},"x-code-samples"," included — is\nread off an operation, and ",[986,1471,1472],{},"replaces the generated samples for its language",".\nThe person who owns the API knows its idioms better than a generator does.",[1010,1475,1479],{"className":1476,"code":1477,"language":1478,"meta":1015,"style":1015},"language-yaml shiki shiki-themes github-light github-dark","paths:\n  \u002Fpets:\n    get:\n      x-codeSamples:\n        - lang: ruby\n          label: Net::HTTP\n          source: |\n            Net::HTTP.get(URI('https:\u002F\u002Fapi.example.com\u002Fpets'))\n","yaml",[930,1480,1481,1490,1497,1504,1511,1525,1535,1545],{"__ignoreMap":1015},[1019,1482,1483,1487],{"class":1021,"line":1022},[1019,1484,1486],{"class":1485},"s9eBZ","paths",[1019,1488,1489],{"class":1036},":\n",[1019,1491,1492,1495],{"class":1021,"line":1040},[1019,1493,1494],{"class":1485},"  \u002Fpets",[1019,1496,1489],{"class":1036},[1019,1498,1499,1502],{"class":1021,"line":1046},[1019,1500,1501],{"class":1485},"    get",[1019,1503,1489],{"class":1036},[1019,1505,1506,1509],{"class":1021,"line":1069},[1019,1507,1508],{"class":1485},"      x-codeSamples",[1019,1510,1489],{"class":1036},[1019,1512,1513,1516,1519,1522],{"class":1021,"line":1075},[1019,1514,1515],{"class":1036},"        - ",[1019,1517,1518],{"class":1485},"lang",[1019,1520,1521],{"class":1036},": ",[1019,1523,1524],{"class":1052},"ruby\n",[1019,1526,1527,1530,1532],{"class":1021,"line":1179},[1019,1528,1529],{"class":1485},"          label",[1019,1531,1521],{"class":1036},[1019,1533,1534],{"class":1052},"Net::HTTP\n",[1019,1536,1537,1540,1542],{"class":1021,"line":1190},[1019,1538,1539],{"class":1485},"          source",[1019,1541,1521],{"class":1036},[1019,1543,1544],{"class":1025},"|\n",[1019,1546,1547],{"class":1021,"line":1200},[1019,1548,1549],{"class":1052},"            Net::HTTP.get(URI('https:\u002F\u002Fapi.example.com\u002Fpets'))\n",[896,1551,1552,1553,1556],{},"Such a sample is ",[986,1554,1555],{},"static"," — it cannot follow the reader's edits — so the panel\nsays who wrote it and that it does not follow the edits above. A reader who\nchanged the body and switched to it would otherwise conclude the editor is broken\nrather than that this sample is fixed.",[896,1558,1559],{},"Its language is not visible where the grammar set is written: a remote source has\nnot been cloned yet. So name it:",[1010,1561,1563],{"className":1012,"code":1562,"language":1014,"meta":1015,"style":1015},"duxt: {\n  sampleLanguages: ['ruby']\n}\n",[930,1564,1565,1573,1585],{"__ignoreMap":1015},[1019,1566,1567,1570],{"class":1021,"line":1022},[1019,1568,1569],{"class":1032},"duxt",[1019,1571,1572],{"class":1036},": {\n",[1019,1574,1575,1578,1581,1583],{"class":1021,"line":1040},[1019,1576,1577],{"class":1032},"  sampleLanguages",[1019,1579,1580],{"class":1036},": [",[1019,1582,1164],{"class":1052},[1019,1584,1066],{"class":1036},[1019,1586,1587],{"class":1021,"line":1046},[1019,1588,1589],{"class":1036},"}\n",[896,1591,1592],{},"Without that the sample renders as plain text.",[1594,1595,1596],"style",{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}",{"title":1015,"searchDepth":1040,"depth":1040,"links":1598},[1599,1600,1601,1602,1605,1606,1607],{"id":902,"depth":1040,"text":903},{"id":1000,"depth":1040,"text":1001},{"id":1007,"depth":1040,"text":1008},{"id":1127,"depth":1040,"text":1128,"children":1603},[1604],{"id":1378,"depth":1046,"text":1379},{"id":1427,"depth":1040,"text":1428},{"id":1444,"depth":1040,"text":1445},{"id":1458,"depth":1040,"text":1459},[1609],{"name":1610,"commits":1040},"Titus Kirch","md","2026-09-09T12:55:29+02:00",{},"---\ntitle: Request samples\ndescription: The same request in twelve clients, and how to add your own.\nicon: lucide:code\n---\n\nBeside the client, the request the reader has built — written out in the language\nthey work in, and rewritten on every keystroke.\n\n## What ships\n\n| Group        | Clients                             |\n| :----------- | :---------------------------------- |\n| `curl`       | curl                                |\n| TypeScript   | `fetch`, `$fetch`, `useFetch`, axios |\n| Python       | requests, httpx, urllib             |\n| Go           | `net\u002Fhttp`                          |\n| PHP          | Guzzle, Laravel `Http`, curl extension |\n\n**Seven are on by default:** curl, `fetch`, `$fetch`, Python requests, Go, Guzzle\nand Laravel `Http`. The other five are the second client for a language that\nalready has one on screen, and a picker is for choosing rather than for listing\neverything that exists.\n\n## Two levels\n\nThe language is the tab and the client a select inside it, so PHP with three\nclients costs one tab. A site adding three of its own for one language still\ncosts one. The reader's choice is remembered across pages — a reader who works in\ncurl works in curl on the next endpoint too.\n\n## Configuring the list\n\n```ts\nexport default defineAppConfig({\n  duxt: {\n    requestSamples: ['curl', 'php-guzzle', 'php-laravel']\n  }\n})\n```\n\nA string picks one that ships; the ids are `curl`, `fetch`, `ofetch`,\n`use-fetch`, `axios`, `python-requests`, `python-httpx`, `python-urllib`, `go`,\n`php-guzzle`, `php-laravel`, `php-curl`.\n\nThe list **replaces** rather than extends, like every other list in the config:\notherwise a site documenting a PHP API could add its clients but never drop the\nones it does not want. The order is the order they appear in.\n\n## Your own generator\n\nAn object adds one of your own — or replaces one that ships, by reusing its id.\n\n```ts\nrequestSamples: [\n  'curl',\n  {\n    id: 'ruby',\n    group: 'Ruby',\n    label: 'Net::HTTP',\n    language: 'ruby',\n    generate: (request) => `\nuri = URI('${request.url}')\nNet::HTTP.get(uri)\n`.trim()\n  }\n]\n```\n\n| Field      | Type                                    | Notes                                     |\n| :--------- | :-------------------------------------- | :---------------------------------------- |\n| `id`       | `string`                                | Stable: it is also the remembered value   |\n| `group`    | `DuxtText`                              | The tab                                   |\n| `label`    | `DuxtText`                              | The entry inside the tab                  |\n| `language` | `string`                                | A Shiki id — it decides the grammar       |\n| `generate` | `(request) => string`                   | Synchronous, pure, no network, no DOM     |\n\n`generate` runs in the **browser**, on every keystroke, because the sample has to\nfollow the request being edited. `request` is `{ method, url, headers, body?, responseType? }`,\nwhere `body` is the editor's text and not parsed — a generator that wants it as\ndata parses it itself, and gets to decide what to do when it is not JSON.\n\n\n### Why TypeScript and not JavaScript\n\n`$fetch`, `useFetch` and axios all take the response shape as a type parameter,\nand `responseType` is what fills it: `$fetch\u003CWidget>(…)` is the line somebody\nactually writes. `fetch` has none — it returns a `Response` whatever the body\nturns out to be — so its sample is the same in either language.\n\nThat is also why there is one group and not two. A JavaScript group beside this\none would carry a `fetch` that never differs and three clients that differ only\nwhere the document named its response schema, for twice the tabs.\n\n`responseType` is the component name of what a successful response returns —\n`Widget`, or `Widget[]` for a list. It is absent where the response schema is\ninline rather than a `$ref`, and a sample then simply has no type parameter:\nnothing here invents a name the document did not give.\n\n## What a sample shows\n\n**The request, and nothing after it.** The response is already on screen in the\npanel below the editor, so a sample that fetched it a second time would be showing\nthe reader something they can see — at the cost of an error branch in every\nlanguage that has one.\n\nGo is the exception and keeps its `err` checks: without them it is not Go, and a\nsnippet that does not compile is worse than a long one.\n\n## Grammars are paid for, not assumed\n\nThese samples are coloured in the browser, so every language is bytes a reader\ndownloads — unlike a Markdown fence, whose grammar is a build-time cost and never\nreaches a browser at all.\n\nSo the grammar set is **generated from the list above**: a site ships exactly the\nlanguages its samples name. The default seven need six grammars. Loading Shiki's\nown lazy map instead would cost 3 KB and make every build emit 242 grammar\nchunks.\n\n## Samples from the document\n\n`x-codeSamples` — under either spelling, the older `x-code-samples` included — is\nread off an operation, and **replaces the generated samples for its language**.\nThe person who owns the API knows its idioms better than a generator does.\n\n```yaml\npaths:\n  \u002Fpets:\n    get:\n      x-codeSamples:\n        - lang: ruby\n          label: Net::HTTP\n          source: |\n            Net::HTTP.get(URI('https:\u002F\u002Fapi.example.com\u002Fpets'))\n```\n\nSuch a sample is **static** — it cannot follow the reader's edits — so the panel\nsays who wrote it and that it does not follow the edits above. A reader who\nchanged the body and switched to it would otherwise conclude the editor is broken\nrather than that this sample is fixed.\n\nIts language is not visible where the grammar set is written: a remote source has\nnot been cloned yet. So name it:\n\n```ts\nduxt: {\n  sampleLanguages: ['ruby']\n}\n```\n\nWithout that the sample renders as plain text.\n",{"title":739,"description":742},{"loc":740},"LAm-bEHJKPjZ_EsOgyygs1RmdESC9OxiR_pPJHtE8tg","en-GB",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":1620},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Crect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\"\u002F>\u003Cpath d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"\u002F>\u003C\u002Fg>",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":1622},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M15 5.88L14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88M7 10v12\"\u002F>",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":1624},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M9 18.12L10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88M17 14V2\"\u002F>",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":1626},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.12 2.12 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.12 2.12 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.12 2.12 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.12 2.12 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.12 2.12 0 0 0 1.597-1.16z\"\u002F>",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":1628},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Ccircle cx=\"12\" cy=\"12\" r=\"10\"\u002F>\u003Cpath d=\"M12 8v4m0 4h.01\"\u002F>\u003C\u002Fg>",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":1630},"\u003Cpath fill=\"currentColor\" d=\"M20.317 4.37a19.8 19.8 0 0 0-4.885-1.515a.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.3 18.3 0 0 0-5.487 0a13 13 0 0 0-.617-1.25a.08.08 0 0 0-.079-.037A19.7 19.7 0 0 0 3.677 4.37a.1.1 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.08.08 0 0 0 .031.057a19.9 19.9 0 0 0 5.993 3.03a.08.08 0 0 0 .084-.028a14 14 0 0 0 1.226-1.994a.076.076 0 0 0-.041-.106a13 13 0 0 1-1.872-.892a.077.077 0 0 1-.008-.128a10 10 0 0 0 .372-.292a.07.07 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.07.07 0 0 1 .078.01q.181.149.373.292a.077.077 0 0 1-.006.127a12.3 12.3 0 0 1-1.873.892a.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.08.08 0 0 0 .084.028a19.8 19.8 0 0 0 6.002-3.03a.08.08 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.06.06 0 0 0-.031-.03M8.02 15.33c-1.182 0-2.157-1.085-2.157-2.419c0-1.333.956-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.956 2.418-2.157 2.418m7.975 0c-1.183 0-2.157-1.085-2.157-2.419c0-1.333.955-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.946 2.418-2.157 2.418\"\u002F>",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":1632},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M12 5v16m4-8h2m-2-4h2m2.001 10A2 2 0 0 0 22 17V5a2 2 0 0 0-1.999-2L16 3.002A5 5 0 0 0 12 5a5 5 0 0 0-4-2H4a2 2 0 0 0-2 2v12a2 2 0 0 0 1.999 2H8a5 5 0 0 1 4 2a5 5 0 0 1 4-2zM6 13h2M6 9h2\"\u002F>",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":1634},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M7 7h10v10M7 17L17 7\"\u002F>",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":1636},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497zM15 5l4 4\"\u002F>",{"left":833,"top":833,"width":834,"height":834,"rotate":833,"vFlip":835,"hFlip":835,"body":1638},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m12 19l-7-7l7-7m7 7H5\"\u002F>",1789004650086]