[{"data":1,"prerenderedAt":4329},["ShallowReactive",2],{"/ai/markdown-for-agents-without-cloudflare/":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"head":10,"tags":26,"chapters":29,"created":25,"thumb":31,"body":32,"_type":4323,"_id":4324,"_source":4325,"_file":4326,"_stem":4327,"_extension":4328},"/ai/markdown-for-agents-without-cloudflare","ai",false,"","Implementing Markdown for Agents Without Cloudflare","A technical guide to serving markdown to AI agents via content negotiation. Build-time HTML-to-markdown conversion with Turndown, Vercel routing, and zero runtime cost.",{"title":11,"link":12,"meta":16},"Implementing Markdown for Agents Without Cloudflare | pragmate.dev",[13],{"rel":14,"href":15},"canonical","https://pragmate.dev/ai/markdown-for-agents-without-cloudflare/",[17,20,23],{"name":18,"content":19},"twitter:creator","@pawelmadeja",{"name":21,"content":22},"author","Paweł Madeja",{"name":24,"content":25},"article:published_time","2026-04-12",{"time":27,"level":28},"10 min","Medium",[30],"/ai/markdown-for-agents-without-cloudflare/","code",{"type":33,"children":34,"toc":4305},"root",[35,43,59,92,111,144,158,162,166,173,276,279,285,327,961,981,1045,1052,1087,2239,2245,2259,2483,2489,2587,2981,2986,2992,3027,3037,3040,3046,3065,3647,3652,3694,3727,3758,3768,3771,3777,3782,3948,3953,3964,3990,4000,4043,4058,4070,4097,4108,4162,4165,4171,4176,4181,4260,4271,4274,4280,4285,4299],{"type":36,"tag":37,"props":38,"children":39},"element","p",{},[40],{"type":41,"value":42},"text","Markdown is becoming the new API for websites. Not for humans - for machines. AI agents, LLM-powered tools, and crawlers all need to consume web content, and HTML is a terrible format for that. It is full of layout noise, scripts, and styling that wastes tokens and confuses models.",{"type":36,"tag":37,"props":44,"children":45},{},[46,48,57],{"type":41,"value":47},"Cloudflare introduced ",{"type":36,"tag":49,"props":50,"children":54},"a",{"href":51,"rel":52},"https://blog.cloudflare.com/markdown-for-agents/",[53],"nofollow",[55],{"type":41,"value":56},"Markdown for Agents",{"type":41,"value":58}," to address this problem:",{"type":36,"tag":60,"props":61,"children":62},"blockquote",{},[63],{"type":36,"tag":37,"props":64,"children":65},{},[66,68,74,76,82,84,90],{"type":41,"value":67},"Feeding raw HTML to an AI is like paying by the word to read packaging instead of the letter inside. A simple ",{"type":36,"tag":31,"props":69,"children":71},{"className":70},[],[72],{"type":41,"value":73},"## About Us",{"type":41,"value":75}," on a page in markdown costs roughly 3 tokens; its HTML equivalent – ",{"type":36,"tag":31,"props":77,"children":79},{"className":78},[],[80],{"type":41,"value":81},"\u003Ch2 class=\"section-title\" id=\"about\">About Us\u003C/h2>",{"type":41,"value":83}," – burns 12-15, and that's before you account for the ",{"type":36,"tag":31,"props":85,"children":87},{"className":86},[],[88],{"type":41,"value":89},"\u003Cdiv>",{"type":41,"value":91}," wrappers, nav bars, and script tags that pad every real web page and have zero semantic value.",{"type":36,"tag":37,"props":93,"children":94},{},[95,97,103,105],{"type":41,"value":96},"Their solution is elegant: same URL, same content, but the server returns markdown instead of HTML when the client sends an ",{"type":36,"tag":31,"props":98,"children":100},{"className":99},[],[101],{"type":41,"value":102},"Accept: text/markdown",{"type":41,"value":104}," header. It is standard HTTP content negotiation - a simple idea with a big impact on how AI tools read your site. ",{"type":36,"tag":106,"props":107,"children":108},"strong",{},[109],{"type":41,"value":110},"Cloudflare's implementation requires their Pro plan, but you don't actually need it.",{"type":36,"tag":37,"props":112,"children":113},{},[114,119,121,126,128,134,136,142],{"type":36,"tag":106,"props":115,"children":116},{},[117],{"type":41,"value":118},"This post walks through a production implementation I built for a client on Nuxt (prerendered) and Vercel that does the same thing at build time, with zero runtime cost",{"type":41,"value":120},". Every URL on the site returns two representations of the same resource: a browser gets HTML, and an agent sending ",{"type":36,"tag":31,"props":122,"children":124},{"className":123},[],[125],{"type":41,"value":102},{"type":41,"value":127}," gets clean markdown with YAML frontmatter. Nothing is converted at request time - during the build, a ",{"type":36,"tag":31,"props":129,"children":131},{"className":130},[],[132],{"type":41,"value":133},"content.md",{"type":41,"value":135}," file is generated alongside each ",{"type":36,"tag":31,"props":137,"children":139},{"className":138},[],[140],{"type":41,"value":141},"index.html",{"type":41,"value":143},", and the hosting layer decides which file to serve based on the request header. No server-side rendering, no edge functions, no additional compute per request.",{"type":36,"tag":37,"props":145,"children":146},{},[147,149,156],{"type":41,"value":148},"If you want the business case and token math, read the ",{"type":36,"tag":49,"props":150,"children":153},{"href":151,"rel":152},"https://coditive.com/blog/how-to-make-a-website-readable-by-ai/",[53],[154],{"type":41,"value":155},"companion article on coditive.com",{"type":41,"value":157},". This article is the how.",{"type":36,"tag":159,"props":160,"children":161},"cta",{},[],{"type":36,"tag":163,"props":164,"children":165},"hr",{},[],{"type":36,"tag":167,"props":168,"children":170},"h2",{"id":169},"so-how-does-this-actually-work",[171],{"type":41,"value":172},"So how does this actually work?",{"type":36,"tag":174,"props":175,"children":176},"ol",{},[177,191,204,225,244,265],{"type":36,"tag":178,"props":179,"children":180},"li",{},[181,183,189],{"type":41,"value":182},"Nuxt prerenders all pages to static HTML (",{"type":36,"tag":31,"props":184,"children":186},{"className":185},[],[187],{"type":41,"value":188},"nuxt generate",{"type":41,"value":190},").",{"type":36,"tag":178,"props":192,"children":193},{},[194,196,202],{"type":41,"value":195},"A custom Nuxt module hooks into the build's ",{"type":36,"tag":31,"props":197,"children":199},{"className":198},[],[200],{"type":41,"value":201},"prerender:done",{"type":41,"value":203}," event.",{"type":36,"tag":178,"props":205,"children":206},{},[207,209,215,217,223],{"type":41,"value":208},"For each HTML file: extract metadata from ",{"type":36,"tag":31,"props":210,"children":212},{"className":211},[],[213],{"type":41,"value":214},"\u003Chead>",{"type":41,"value":216},", strip noise, isolate ",{"type":36,"tag":31,"props":218,"children":220},{"className":219},[],[221],{"type":41,"value":222},"\u003Cmain>",{"type":41,"value":224},", convert to markdown via Turndown, prepend YAML frontmatter.",{"type":36,"tag":178,"props":226,"children":227},{},[228,230,235,237,242],{"type":41,"value":229},"Write ",{"type":36,"tag":31,"props":231,"children":233},{"className":232},[],[234],{"type":41,"value":133},{"type":41,"value":236}," next to the corresponding ",{"type":36,"tag":31,"props":238,"children":240},{"className":239},[],[241],{"type":41,"value":141},{"type":41,"value":243},".",{"type":36,"tag":178,"props":245,"children":246},{},[247,249,255,257,263],{"type":41,"value":248},"Vercel ",{"type":36,"tag":31,"props":250,"children":252},{"className":251},[],[253],{"type":41,"value":254},"routes",{"type":41,"value":256}," config serves the right file based on the ",{"type":36,"tag":31,"props":258,"children":260},{"className":259},[],[261],{"type":41,"value":262},"Accept",{"type":41,"value":264}," header.",{"type":36,"tag":178,"props":266,"children":267},{},[268,274],{"type":36,"tag":31,"props":269,"children":271},{"className":270},[],[272],{"type":41,"value":273},"Vary: Accept",{"type":41,"value":275}," header ensures correct CDN caching.",{"type":36,"tag":163,"props":277,"children":278},{},[],{"type":36,"tag":167,"props":280,"children":282},{"id":281},"where-does-the-markdown-conversion-happen",[283],{"type":41,"value":284},"Where does the markdown conversion happen?",{"type":36,"tag":37,"props":286,"children":287},{},[288,290,296,298,303,305,311,313,318,320,325],{"type":41,"value":289},"The module plugs into the Nuxt build lifecycle using ",{"type":36,"tag":31,"props":291,"children":293},{"className":292},[],[294],{"type":41,"value":295},"defineNuxtModule",{"type":41,"value":297},". It registers a hook on Nitro's ",{"type":36,"tag":31,"props":299,"children":301},{"className":300},[],[302],{"type":41,"value":201},{"type":41,"value":304}," event, which fires after all static HTML files are written to disk. I also register ",{"type":36,"tag":31,"props":306,"children":308},{"className":307},[],[309],{"type":41,"value":310},"close",{"type":41,"value":312}," as a safety net for build modes where prerendering is not used - in that case ",{"type":36,"tag":31,"props":314,"children":316},{"className":315},[],[317],{"type":41,"value":201},{"type":41,"value":319}," never fires, but ",{"type":36,"tag":31,"props":321,"children":323},{"className":322},[],[324],{"type":41,"value":310},{"type":41,"value":326}," still does.",{"type":36,"tag":328,"props":329,"children":333},"pre",{"className":330,"code":331,"language":332,"meta":7,"style":7},"language-typescript shiki shiki-themes one-dark-pro","import { defineNuxtModule } from '@nuxt/kit';\n\nexport default defineNuxtModule\u003C{ extractMainContent?: boolean }>({\n  meta: { name: 'markdown-for-agents', configKey: 'markdownForAgents' },\n  defaults: { extractMainContent: false },\n  setup(options, nuxt) {\n    let completed = false;\n\n    const generate = async (nitro: any) => {\n      if (completed) {\n        return;\n      }\n      // ... conversion logic\n      completed = true;\n    };\n\n    (nuxt as any).hook('nitro:init', (nitro: any) => {\n      nitro.hooks.hook('prerender:done', () => generate(nitro));\n      nitro.hooks.hook('close', () => generate(nitro));\n    });\n  },\n});\n","typescript",[334],{"type":36,"tag":31,"props":335,"children":336},{"__ignoreMap":7},[337,381,391,442,494,525,559,588,596,653,675,688,697,707,729,738,746,816,877,934,943,952],{"type":36,"tag":338,"props":339,"children":342},"span",{"class":340,"line":341},"line",1,[343,349,355,360,365,370,376],{"type":36,"tag":338,"props":344,"children":346},{"style":345},"--shiki-default:#C678DD",[347],{"type":41,"value":348},"import",{"type":36,"tag":338,"props":350,"children":352},{"style":351},"--shiki-default:#ABB2BF",[353],{"type":41,"value":354}," { ",{"type":36,"tag":338,"props":356,"children":358},{"style":357},"--shiki-default:#E06C75",[359],{"type":41,"value":295},{"type":36,"tag":338,"props":361,"children":362},{"style":351},[363],{"type":41,"value":364}," } ",{"type":36,"tag":338,"props":366,"children":367},{"style":345},[368],{"type":41,"value":369},"from",{"type":36,"tag":338,"props":371,"children":373},{"style":372},"--shiki-default:#98C379",[374],{"type":41,"value":375}," '@nuxt/kit'",{"type":36,"tag":338,"props":377,"children":378},{"style":351},[379],{"type":41,"value":380},";\n",{"type":36,"tag":338,"props":382,"children":384},{"class":340,"line":383},2,[385],{"type":36,"tag":338,"props":386,"children":388},{"emptyLinePlaceholder":387},true,[389],{"type":41,"value":390},"\n",{"type":36,"tag":338,"props":392,"children":394},{"class":340,"line":393},3,[395,400,405,411,416,421,426,431,437],{"type":36,"tag":338,"props":396,"children":397},{"style":345},[398],{"type":41,"value":399},"export",{"type":36,"tag":338,"props":401,"children":402},{"style":345},[403],{"type":41,"value":404}," default",{"type":36,"tag":338,"props":406,"children":408},{"style":407},"--shiki-default:#61AFEF",[409],{"type":41,"value":410}," defineNuxtModule",{"type":36,"tag":338,"props":412,"children":413},{"style":351},[414],{"type":41,"value":415},"\u003C{ ",{"type":36,"tag":338,"props":417,"children":418},{"style":357},[419],{"type":41,"value":420},"extractMainContent",{"type":36,"tag":338,"props":422,"children":423},{"style":345},[424],{"type":41,"value":425},"?",{"type":36,"tag":338,"props":427,"children":428},{"style":351},[429],{"type":41,"value":430},": ",{"type":36,"tag":338,"props":432,"children":434},{"style":433},"--shiki-default:#E5C07B",[435],{"type":41,"value":436},"boolean",{"type":36,"tag":338,"props":438,"children":439},{"style":351},[440],{"type":41,"value":441}," }>({\n",{"type":36,"tag":338,"props":443,"children":445},{"class":340,"line":444},4,[446,451,456,461,465,470,475,480,484,489],{"type":36,"tag":338,"props":447,"children":448},{"style":357},[449],{"type":41,"value":450},"  meta",{"type":36,"tag":338,"props":452,"children":453},{"style":351},[454],{"type":41,"value":455},": { ",{"type":36,"tag":338,"props":457,"children":458},{"style":357},[459],{"type":41,"value":460},"name",{"type":36,"tag":338,"props":462,"children":463},{"style":351},[464],{"type":41,"value":430},{"type":36,"tag":338,"props":466,"children":467},{"style":372},[468],{"type":41,"value":469},"'markdown-for-agents'",{"type":36,"tag":338,"props":471,"children":472},{"style":351},[473],{"type":41,"value":474},", ",{"type":36,"tag":338,"props":476,"children":477},{"style":357},[478],{"type":41,"value":479},"configKey",{"type":36,"tag":338,"props":481,"children":482},{"style":351},[483],{"type":41,"value":430},{"type":36,"tag":338,"props":485,"children":486},{"style":372},[487],{"type":41,"value":488},"'markdownForAgents'",{"type":36,"tag":338,"props":490,"children":491},{"style":351},[492],{"type":41,"value":493}," },\n",{"type":36,"tag":338,"props":495,"children":497},{"class":340,"line":496},5,[498,503,507,511,515,521],{"type":36,"tag":338,"props":499,"children":500},{"style":357},[501],{"type":41,"value":502},"  defaults",{"type":36,"tag":338,"props":504,"children":505},{"style":351},[506],{"type":41,"value":455},{"type":36,"tag":338,"props":508,"children":509},{"style":357},[510],{"type":41,"value":420},{"type":36,"tag":338,"props":512,"children":513},{"style":351},[514],{"type":41,"value":430},{"type":36,"tag":338,"props":516,"children":518},{"style":517},"--shiki-default:#D19A66",[519],{"type":41,"value":520},"false",{"type":36,"tag":338,"props":522,"children":523},{"style":351},[524],{"type":41,"value":493},{"type":36,"tag":338,"props":526,"children":528},{"class":340,"line":527},6,[529,534,539,545,549,554],{"type":36,"tag":338,"props":530,"children":531},{"style":407},[532],{"type":41,"value":533},"  setup",{"type":36,"tag":338,"props":535,"children":536},{"style":351},[537],{"type":41,"value":538},"(",{"type":36,"tag":338,"props":540,"children":542},{"style":541},"--shiki-default:#E06C75;--shiki-default-font-style:italic",[543],{"type":41,"value":544},"options",{"type":36,"tag":338,"props":546,"children":547},{"style":351},[548],{"type":41,"value":474},{"type":36,"tag":338,"props":550,"children":551},{"style":541},[552],{"type":41,"value":553},"nuxt",{"type":36,"tag":338,"props":555,"children":556},{"style":351},[557],{"type":41,"value":558},") {\n",{"type":36,"tag":338,"props":560,"children":562},{"class":340,"line":561},7,[563,568,573,579,584],{"type":36,"tag":338,"props":564,"children":565},{"style":345},[566],{"type":41,"value":567},"    let",{"type":36,"tag":338,"props":569,"children":570},{"style":357},[571],{"type":41,"value":572}," completed",{"type":36,"tag":338,"props":574,"children":576},{"style":575},"--shiki-default:#56B6C2",[577],{"type":41,"value":578}," =",{"type":36,"tag":338,"props":580,"children":581},{"style":517},[582],{"type":41,"value":583}," false",{"type":36,"tag":338,"props":585,"children":586},{"style":351},[587],{"type":41,"value":380},{"type":36,"tag":338,"props":589,"children":591},{"class":340,"line":590},8,[592],{"type":36,"tag":338,"props":593,"children":594},{"emptyLinePlaceholder":387},[595],{"type":41,"value":390},{"type":36,"tag":338,"props":597,"children":599},{"class":340,"line":598},9,[600,605,610,614,619,624,629,633,638,643,648],{"type":36,"tag":338,"props":601,"children":602},{"style":345},[603],{"type":41,"value":604},"    const",{"type":36,"tag":338,"props":606,"children":607},{"style":407},[608],{"type":41,"value":609}," generate",{"type":36,"tag":338,"props":611,"children":612},{"style":575},[613],{"type":41,"value":578},{"type":36,"tag":338,"props":615,"children":616},{"style":345},[617],{"type":41,"value":618}," async",{"type":36,"tag":338,"props":620,"children":621},{"style":351},[622],{"type":41,"value":623}," (",{"type":36,"tag":338,"props":625,"children":626},{"style":541},[627],{"type":41,"value":628},"nitro",{"type":36,"tag":338,"props":630,"children":631},{"style":351},[632],{"type":41,"value":430},{"type":36,"tag":338,"props":634,"children":635},{"style":433},[636],{"type":41,"value":637},"any",{"type":36,"tag":338,"props":639,"children":640},{"style":351},[641],{"type":41,"value":642},") ",{"type":36,"tag":338,"props":644,"children":645},{"style":345},[646],{"type":41,"value":647},"=>",{"type":36,"tag":338,"props":649,"children":650},{"style":351},[651],{"type":41,"value":652}," {\n",{"type":36,"tag":338,"props":654,"children":656},{"class":340,"line":655},10,[657,662,666,671],{"type":36,"tag":338,"props":658,"children":659},{"style":345},[660],{"type":41,"value":661},"      if",{"type":36,"tag":338,"props":663,"children":664},{"style":351},[665],{"type":41,"value":623},{"type":36,"tag":338,"props":667,"children":668},{"style":357},[669],{"type":41,"value":670},"completed",{"type":36,"tag":338,"props":672,"children":673},{"style":351},[674],{"type":41,"value":558},{"type":36,"tag":338,"props":676,"children":678},{"class":340,"line":677},11,[679,684],{"type":36,"tag":338,"props":680,"children":681},{"style":345},[682],{"type":41,"value":683},"        return",{"type":36,"tag":338,"props":685,"children":686},{"style":351},[687],{"type":41,"value":380},{"type":36,"tag":338,"props":689,"children":691},{"class":340,"line":690},12,[692],{"type":36,"tag":338,"props":693,"children":694},{"style":351},[695],{"type":41,"value":696},"      }\n",{"type":36,"tag":338,"props":698,"children":700},{"class":340,"line":699},13,[701],{"type":36,"tag":338,"props":702,"children":704},{"style":703},"--shiki-default:#7F848E;--shiki-default-font-style:italic",[705],{"type":41,"value":706},"      // ... conversion logic\n",{"type":36,"tag":338,"props":708,"children":710},{"class":340,"line":709},14,[711,716,720,725],{"type":36,"tag":338,"props":712,"children":713},{"style":357},[714],{"type":41,"value":715},"      completed",{"type":36,"tag":338,"props":717,"children":718},{"style":575},[719],{"type":41,"value":578},{"type":36,"tag":338,"props":721,"children":722},{"style":517},[723],{"type":41,"value":724}," true",{"type":36,"tag":338,"props":726,"children":727},{"style":351},[728],{"type":41,"value":380},{"type":36,"tag":338,"props":730,"children":732},{"class":340,"line":731},15,[733],{"type":36,"tag":338,"props":734,"children":735},{"style":351},[736],{"type":41,"value":737},"    };\n",{"type":36,"tag":338,"props":739,"children":741},{"class":340,"line":740},16,[742],{"type":36,"tag":338,"props":743,"children":744},{"emptyLinePlaceholder":387},[745],{"type":41,"value":390},{"type":36,"tag":338,"props":747,"children":749},{"class":340,"line":748},17,[750,755,759,764,769,773,778,782,787,792,796,800,804,808,812],{"type":36,"tag":338,"props":751,"children":752},{"style":351},[753],{"type":41,"value":754},"    (",{"type":36,"tag":338,"props":756,"children":757},{"style":357},[758],{"type":41,"value":553},{"type":36,"tag":338,"props":760,"children":761},{"style":345},[762],{"type":41,"value":763}," as",{"type":36,"tag":338,"props":765,"children":766},{"style":433},[767],{"type":41,"value":768}," any",{"type":36,"tag":338,"props":770,"children":771},{"style":351},[772],{"type":41,"value":190},{"type":36,"tag":338,"props":774,"children":775},{"style":407},[776],{"type":41,"value":777},"hook",{"type":36,"tag":338,"props":779,"children":780},{"style":351},[781],{"type":41,"value":538},{"type":36,"tag":338,"props":783,"children":784},{"style":372},[785],{"type":41,"value":786},"'nitro:init'",{"type":36,"tag":338,"props":788,"children":789},{"style":351},[790],{"type":41,"value":791},", (",{"type":36,"tag":338,"props":793,"children":794},{"style":541},[795],{"type":41,"value":628},{"type":36,"tag":338,"props":797,"children":798},{"style":351},[799],{"type":41,"value":430},{"type":36,"tag":338,"props":801,"children":802},{"style":433},[803],{"type":41,"value":637},{"type":36,"tag":338,"props":805,"children":806},{"style":351},[807],{"type":41,"value":642},{"type":36,"tag":338,"props":809,"children":810},{"style":345},[811],{"type":41,"value":647},{"type":36,"tag":338,"props":813,"children":814},{"style":351},[815],{"type":41,"value":652},{"type":36,"tag":338,"props":817,"children":819},{"class":340,"line":818},18,[820,825,829,834,838,842,846,851,856,860,864,868,872],{"type":36,"tag":338,"props":821,"children":822},{"style":433},[823],{"type":41,"value":824},"      nitro",{"type":36,"tag":338,"props":826,"children":827},{"style":351},[828],{"type":41,"value":243},{"type":36,"tag":338,"props":830,"children":831},{"style":433},[832],{"type":41,"value":833},"hooks",{"type":36,"tag":338,"props":835,"children":836},{"style":351},[837],{"type":41,"value":243},{"type":36,"tag":338,"props":839,"children":840},{"style":407},[841],{"type":41,"value":777},{"type":36,"tag":338,"props":843,"children":844},{"style":351},[845],{"type":41,"value":538},{"type":36,"tag":338,"props":847,"children":848},{"style":372},[849],{"type":41,"value":850},"'prerender:done'",{"type":36,"tag":338,"props":852,"children":853},{"style":351},[854],{"type":41,"value":855},", () ",{"type":36,"tag":338,"props":857,"children":858},{"style":345},[859],{"type":41,"value":647},{"type":36,"tag":338,"props":861,"children":862},{"style":407},[863],{"type":41,"value":609},{"type":36,"tag":338,"props":865,"children":866},{"style":351},[867],{"type":41,"value":538},{"type":36,"tag":338,"props":869,"children":870},{"style":357},[871],{"type":41,"value":628},{"type":36,"tag":338,"props":873,"children":874},{"style":351},[875],{"type":41,"value":876},"));\n",{"type":36,"tag":338,"props":878,"children":880},{"class":340,"line":879},19,[881,885,889,893,897,901,905,910,914,918,922,926,930],{"type":36,"tag":338,"props":882,"children":883},{"style":433},[884],{"type":41,"value":824},{"type":36,"tag":338,"props":886,"children":887},{"style":351},[888],{"type":41,"value":243},{"type":36,"tag":338,"props":890,"children":891},{"style":433},[892],{"type":41,"value":833},{"type":36,"tag":338,"props":894,"children":895},{"style":351},[896],{"type":41,"value":243},{"type":36,"tag":338,"props":898,"children":899},{"style":407},[900],{"type":41,"value":777},{"type":36,"tag":338,"props":902,"children":903},{"style":351},[904],{"type":41,"value":538},{"type":36,"tag":338,"props":906,"children":907},{"style":372},[908],{"type":41,"value":909},"'close'",{"type":36,"tag":338,"props":911,"children":912},{"style":351},[913],{"type":41,"value":855},{"type":36,"tag":338,"props":915,"children":916},{"style":345},[917],{"type":41,"value":647},{"type":36,"tag":338,"props":919,"children":920},{"style":407},[921],{"type":41,"value":609},{"type":36,"tag":338,"props":923,"children":924},{"style":351},[925],{"type":41,"value":538},{"type":36,"tag":338,"props":927,"children":928},{"style":357},[929],{"type":41,"value":628},{"type":36,"tag":338,"props":931,"children":932},{"style":351},[933],{"type":41,"value":876},{"type":36,"tag":338,"props":935,"children":937},{"class":340,"line":936},20,[938],{"type":36,"tag":338,"props":939,"children":940},{"style":351},[941],{"type":41,"value":942},"    });\n",{"type":36,"tag":338,"props":944,"children":946},{"class":340,"line":945},21,[947],{"type":36,"tag":338,"props":948,"children":949},{"style":351},[950],{"type":41,"value":951},"  },\n",{"type":36,"tag":338,"props":953,"children":955},{"class":340,"line":954},22,[956],{"type":36,"tag":338,"props":957,"children":958},{"style":351},[959],{"type":41,"value":960},"});\n",{"type":36,"tag":37,"props":962,"children":963},{},[964,966,971,973,979],{"type":41,"value":965},"The ",{"type":36,"tag":31,"props":967,"children":969},{"className":968},[],[970],{"type":41,"value":670},{"type":41,"value":972}," flag prevents double execution if both hooks fire. Register the module in ",{"type":36,"tag":31,"props":974,"children":976},{"className":975},[],[977],{"type":41,"value":978},"nuxt.config.ts",{"type":41,"value":980},":",{"type":36,"tag":328,"props":982,"children":984},{"className":330,"code":983,"language":332,"meta":7,"style":7},"modules: [\n  ['./modules/markdown-for-agents', { extractMainContent: true }],\n]\n",[985],{"type":36,"tag":31,"props":986,"children":987},{"__ignoreMap":7},[988,1001,1037],{"type":36,"tag":338,"props":989,"children":990},{"class":340,"line":341},[991,996],{"type":36,"tag":338,"props":992,"children":993},{"style":357},[994],{"type":41,"value":995},"modules",{"type":36,"tag":338,"props":997,"children":998},{"style":351},[999],{"type":41,"value":1000},": [\n",{"type":36,"tag":338,"props":1002,"children":1003},{"class":340,"line":383},[1004,1009,1014,1019,1023,1027,1032],{"type":36,"tag":338,"props":1005,"children":1006},{"style":351},[1007],{"type":41,"value":1008},"  [",{"type":36,"tag":338,"props":1010,"children":1011},{"style":372},[1012],{"type":41,"value":1013},"'./modules/markdown-for-agents'",{"type":36,"tag":338,"props":1015,"children":1016},{"style":351},[1017],{"type":41,"value":1018},", { ",{"type":36,"tag":338,"props":1020,"children":1021},{"style":357},[1022],{"type":41,"value":420},{"type":36,"tag":338,"props":1024,"children":1025},{"style":351},[1026],{"type":41,"value":430},{"type":36,"tag":338,"props":1028,"children":1029},{"style":517},[1030],{"type":41,"value":1031},"true",{"type":36,"tag":338,"props":1033,"children":1034},{"style":351},[1035],{"type":41,"value":1036}," }],\n",{"type":36,"tag":338,"props":1038,"children":1039},{"class":340,"line":393},[1040],{"type":36,"tag":338,"props":1041,"children":1042},{"style":351},[1043],{"type":41,"value":1044},"]\n",{"type":36,"tag":1046,"props":1047,"children":1049},"h3",{"id":1048},"cleaning-the-html",[1050],{"type":41,"value":1051},"Cleaning the HTML",{"type":36,"tag":37,"props":1053,"children":1054},{},[1055,1057,1062,1064,1070,1072,1078,1079,1085],{"type":41,"value":1056},"Raw HTML has a lot of elements that are noise for agents. I strip them in stages before conversion. The regex approach below works well for typical prerendered output where tags like ",{"type":36,"tag":31,"props":1058,"children":1060},{"className":1059},[],[1061],{"type":41,"value":222},{"type":41,"value":1063}," or ",{"type":36,"tag":31,"props":1065,"children":1067},{"className":1066},[],[1068],{"type":41,"value":1069},"\u003Cnav>",{"type":41,"value":1071}," are not nested inside themselves. For more complex HTML structures, a DOM parser like ",{"type":36,"tag":31,"props":1073,"children":1075},{"className":1074},[],[1076],{"type":41,"value":1077},"cheerio",{"type":41,"value":1063},{"type":36,"tag":31,"props":1080,"children":1082},{"className":1081},[],[1083],{"type":41,"value":1084},"linkedom",{"type":41,"value":1086}," would be more robust.",{"type":36,"tag":328,"props":1088,"children":1090},{"className":330,"code":1089,"language":332,"meta":7,"style":7},"// Stage 1: Remove script, style, noscript\nfunction stripNoisyTags(html: string) {\n  return html\n    .replace(/\u003Cscript\\b[^>]*>[\\s\\S]*?\u003C\\/script>/gi, '')\n    .replace(/\u003Cstyle\\b[^>]*>[\\s\\S]*?\u003C\\/style>/gi, '')\n    .replace(/\u003Cnoscript\\b[^>]*>[\\s\\S]*?\u003C\\/noscript>/gi, '')\n}\n\n// Stage 2: Extract \u003Cmain> or \u003Carticle> if available\nfunction extractMainContent(html: string) {\n  const main = html.match(/\u003Cmain\\b[^>]*>[\\s\\S]*?\u003C\\/main>/i)\n  if (main?.[0]) return main[0]\n  const article = html.match(/\u003Carticle\\b[^>]*>[\\s\\S]*?\u003C\\/article>/i)\n  if (article?.[0]) return article[0]\n  return html\n}\n\n// Stage 3: Strip layout chrome\nfunction stripLayoutChrome(html: string) {\n  return html\n    .replace(/\u003Cheader\\b[^>]*>[\\s\\S]*?\u003C\\/header>/gi, '')\n    .replace(/\u003Cnav\\b[^>]*>[\\s\\S]*?\u003C\\/nav>/gi, '')\n    .replace(/\u003Cfooter\\b[^>]*>[\\s\\S]*?\u003C\\/footer>/gi, '')\n    .replace(/\u003Caside\\b[^>]*>[\\s\\S]*?\u003C\\/aside>/gi, '')\n    .replace(/\u003Cform\\b[^>]*>[\\s\\S]*?\u003C\\/form>/gi, '')\n}\n",[1091],{"type":36,"tag":31,"props":1092,"children":1093},{"__ignoreMap":7},[1094,1102,1137,1150,1245,1326,1407,1415,1422,1430,1462,1556,1609,1699,1747,1758,1765,1772,1780,1812,1823,1904,1985,2067,2149,2231],{"type":36,"tag":338,"props":1095,"children":1096},{"class":340,"line":341},[1097],{"type":36,"tag":338,"props":1098,"children":1099},{"style":703},[1100],{"type":41,"value":1101},"// Stage 1: Remove script, style, noscript\n",{"type":36,"tag":338,"props":1103,"children":1104},{"class":340,"line":383},[1105,1110,1115,1119,1124,1128,1133],{"type":36,"tag":338,"props":1106,"children":1107},{"style":345},[1108],{"type":41,"value":1109},"function",{"type":36,"tag":338,"props":1111,"children":1112},{"style":407},[1113],{"type":41,"value":1114}," stripNoisyTags",{"type":36,"tag":338,"props":1116,"children":1117},{"style":351},[1118],{"type":41,"value":538},{"type":36,"tag":338,"props":1120,"children":1121},{"style":541},[1122],{"type":41,"value":1123},"html",{"type":36,"tag":338,"props":1125,"children":1126},{"style":351},[1127],{"type":41,"value":430},{"type":36,"tag":338,"props":1129,"children":1130},{"style":433},[1131],{"type":41,"value":1132},"string",{"type":36,"tag":338,"props":1134,"children":1135},{"style":351},[1136],{"type":41,"value":558},{"type":36,"tag":338,"props":1138,"children":1139},{"class":340,"line":393},[1140,1145],{"type":36,"tag":338,"props":1141,"children":1142},{"style":345},[1143],{"type":41,"value":1144},"  return",{"type":36,"tag":338,"props":1146,"children":1147},{"style":357},[1148],{"type":41,"value":1149}," html\n",{"type":36,"tag":338,"props":1151,"children":1152},{"class":340,"line":444},[1153,1158,1163,1167,1172,1177,1182,1187,1192,1197,1201,1206,1211,1216,1221,1226,1231,1235,1240],{"type":36,"tag":338,"props":1154,"children":1155},{"style":351},[1156],{"type":41,"value":1157},"    .",{"type":36,"tag":338,"props":1159,"children":1160},{"style":407},[1161],{"type":41,"value":1162},"replace",{"type":36,"tag":338,"props":1164,"children":1165},{"style":351},[1166],{"type":41,"value":538},{"type":36,"tag":338,"props":1168,"children":1169},{"style":357},[1170],{"type":41,"value":1171},"/\u003Cscript",{"type":36,"tag":338,"props":1173,"children":1174},{"style":345},[1175],{"type":41,"value":1176},"\\b",{"type":36,"tag":338,"props":1178,"children":1179},{"style":517},[1180],{"type":41,"value":1181},"[",{"type":36,"tag":338,"props":1183,"children":1184},{"style":351},[1185],{"type":41,"value":1186},"^",{"type":36,"tag":338,"props":1188,"children":1189},{"style":517},[1190],{"type":41,"value":1191},">]*",{"type":36,"tag":338,"props":1193,"children":1194},{"style":357},[1195],{"type":41,"value":1196},">",{"type":36,"tag":338,"props":1198,"children":1199},{"style":517},[1200],{"type":41,"value":1181},{"type":36,"tag":338,"props":1202,"children":1203},{"style":357},[1204],{"type":41,"value":1205},"\\s\\S",{"type":36,"tag":338,"props":1207,"children":1208},{"style":517},[1209],{"type":41,"value":1210},"]*?",{"type":36,"tag":338,"props":1212,"children":1213},{"style":357},[1214],{"type":41,"value":1215},"\u003C",{"type":36,"tag":338,"props":1217,"children":1218},{"style":575},[1219],{"type":41,"value":1220},"\\/",{"type":36,"tag":338,"props":1222,"children":1223},{"style":357},[1224],{"type":41,"value":1225},"script>/",{"type":36,"tag":338,"props":1227,"children":1228},{"style":345},[1229],{"type":41,"value":1230},"gi",{"type":36,"tag":338,"props":1232,"children":1233},{"style":351},[1234],{"type":41,"value":474},{"type":36,"tag":338,"props":1236,"children":1237},{"style":372},[1238],{"type":41,"value":1239},"''",{"type":36,"tag":338,"props":1241,"children":1242},{"style":351},[1243],{"type":41,"value":1244},")\n",{"type":36,"tag":338,"props":1246,"children":1247},{"class":340,"line":496},[1248,1252,1256,1260,1265,1269,1273,1277,1281,1285,1289,1293,1297,1301,1305,1310,1314,1318,1322],{"type":36,"tag":338,"props":1249,"children":1250},{"style":351},[1251],{"type":41,"value":1157},{"type":36,"tag":338,"props":1253,"children":1254},{"style":407},[1255],{"type":41,"value":1162},{"type":36,"tag":338,"props":1257,"children":1258},{"style":351},[1259],{"type":41,"value":538},{"type":36,"tag":338,"props":1261,"children":1262},{"style":357},[1263],{"type":41,"value":1264},"/\u003Cstyle",{"type":36,"tag":338,"props":1266,"children":1267},{"style":345},[1268],{"type":41,"value":1176},{"type":36,"tag":338,"props":1270,"children":1271},{"style":517},[1272],{"type":41,"value":1181},{"type":36,"tag":338,"props":1274,"children":1275},{"style":351},[1276],{"type":41,"value":1186},{"type":36,"tag":338,"props":1278,"children":1279},{"style":517},[1280],{"type":41,"value":1191},{"type":36,"tag":338,"props":1282,"children":1283},{"style":357},[1284],{"type":41,"value":1196},{"type":36,"tag":338,"props":1286,"children":1287},{"style":517},[1288],{"type":41,"value":1181},{"type":36,"tag":338,"props":1290,"children":1291},{"style":357},[1292],{"type":41,"value":1205},{"type":36,"tag":338,"props":1294,"children":1295},{"style":517},[1296],{"type":41,"value":1210},{"type":36,"tag":338,"props":1298,"children":1299},{"style":357},[1300],{"type":41,"value":1215},{"type":36,"tag":338,"props":1302,"children":1303},{"style":575},[1304],{"type":41,"value":1220},{"type":36,"tag":338,"props":1306,"children":1307},{"style":357},[1308],{"type":41,"value":1309},"style>/",{"type":36,"tag":338,"props":1311,"children":1312},{"style":345},[1313],{"type":41,"value":1230},{"type":36,"tag":338,"props":1315,"children":1316},{"style":351},[1317],{"type":41,"value":474},{"type":36,"tag":338,"props":1319,"children":1320},{"style":372},[1321],{"type":41,"value":1239},{"type":36,"tag":338,"props":1323,"children":1324},{"style":351},[1325],{"type":41,"value":1244},{"type":36,"tag":338,"props":1327,"children":1328},{"class":340,"line":527},[1329,1333,1337,1341,1346,1350,1354,1358,1362,1366,1370,1374,1378,1382,1386,1391,1395,1399,1403],{"type":36,"tag":338,"props":1330,"children":1331},{"style":351},[1332],{"type":41,"value":1157},{"type":36,"tag":338,"props":1334,"children":1335},{"style":407},[1336],{"type":41,"value":1162},{"type":36,"tag":338,"props":1338,"children":1339},{"style":351},[1340],{"type":41,"value":538},{"type":36,"tag":338,"props":1342,"children":1343},{"style":357},[1344],{"type":41,"value":1345},"/\u003Cnoscript",{"type":36,"tag":338,"props":1347,"children":1348},{"style":345},[1349],{"type":41,"value":1176},{"type":36,"tag":338,"props":1351,"children":1352},{"style":517},[1353],{"type":41,"value":1181},{"type":36,"tag":338,"props":1355,"children":1356},{"style":351},[1357],{"type":41,"value":1186},{"type":36,"tag":338,"props":1359,"children":1360},{"style":517},[1361],{"type":41,"value":1191},{"type":36,"tag":338,"props":1363,"children":1364},{"style":357},[1365],{"type":41,"value":1196},{"type":36,"tag":338,"props":1367,"children":1368},{"style":517},[1369],{"type":41,"value":1181},{"type":36,"tag":338,"props":1371,"children":1372},{"style":357},[1373],{"type":41,"value":1205},{"type":36,"tag":338,"props":1375,"children":1376},{"style":517},[1377],{"type":41,"value":1210},{"type":36,"tag":338,"props":1379,"children":1380},{"style":357},[1381],{"type":41,"value":1215},{"type":36,"tag":338,"props":1383,"children":1384},{"style":575},[1385],{"type":41,"value":1220},{"type":36,"tag":338,"props":1387,"children":1388},{"style":357},[1389],{"type":41,"value":1390},"noscript>/",{"type":36,"tag":338,"props":1392,"children":1393},{"style":345},[1394],{"type":41,"value":1230},{"type":36,"tag":338,"props":1396,"children":1397},{"style":351},[1398],{"type":41,"value":474},{"type":36,"tag":338,"props":1400,"children":1401},{"style":372},[1402],{"type":41,"value":1239},{"type":36,"tag":338,"props":1404,"children":1405},{"style":351},[1406],{"type":41,"value":1244},{"type":36,"tag":338,"props":1408,"children":1409},{"class":340,"line":561},[1410],{"type":36,"tag":338,"props":1411,"children":1412},{"style":351},[1413],{"type":41,"value":1414},"}\n",{"type":36,"tag":338,"props":1416,"children":1417},{"class":340,"line":590},[1418],{"type":36,"tag":338,"props":1419,"children":1420},{"emptyLinePlaceholder":387},[1421],{"type":41,"value":390},{"type":36,"tag":338,"props":1423,"children":1424},{"class":340,"line":598},[1425],{"type":36,"tag":338,"props":1426,"children":1427},{"style":703},[1428],{"type":41,"value":1429},"// Stage 2: Extract \u003Cmain> or \u003Carticle> if available\n",{"type":36,"tag":338,"props":1431,"children":1432},{"class":340,"line":655},[1433,1437,1442,1446,1450,1454,1458],{"type":36,"tag":338,"props":1434,"children":1435},{"style":345},[1436],{"type":41,"value":1109},{"type":36,"tag":338,"props":1438,"children":1439},{"style":407},[1440],{"type":41,"value":1441}," extractMainContent",{"type":36,"tag":338,"props":1443,"children":1444},{"style":351},[1445],{"type":41,"value":538},{"type":36,"tag":338,"props":1447,"children":1448},{"style":541},[1449],{"type":41,"value":1123},{"type":36,"tag":338,"props":1451,"children":1452},{"style":351},[1453],{"type":41,"value":430},{"type":36,"tag":338,"props":1455,"children":1456},{"style":433},[1457],{"type":41,"value":1132},{"type":36,"tag":338,"props":1459,"children":1460},{"style":351},[1461],{"type":41,"value":558},{"type":36,"tag":338,"props":1463,"children":1464},{"class":340,"line":677},[1465,1470,1475,1479,1484,1488,1493,1497,1502,1506,1510,1514,1518,1522,1526,1530,1534,1538,1542,1547,1552],{"type":36,"tag":338,"props":1466,"children":1467},{"style":345},[1468],{"type":41,"value":1469},"  const",{"type":36,"tag":338,"props":1471,"children":1472},{"style":433},[1473],{"type":41,"value":1474}," main",{"type":36,"tag":338,"props":1476,"children":1477},{"style":575},[1478],{"type":41,"value":578},{"type":36,"tag":338,"props":1480,"children":1481},{"style":433},[1482],{"type":41,"value":1483}," html",{"type":36,"tag":338,"props":1485,"children":1486},{"style":351},[1487],{"type":41,"value":243},{"type":36,"tag":338,"props":1489,"children":1490},{"style":407},[1491],{"type":41,"value":1492},"match",{"type":36,"tag":338,"props":1494,"children":1495},{"style":351},[1496],{"type":41,"value":538},{"type":36,"tag":338,"props":1498,"children":1499},{"style":357},[1500],{"type":41,"value":1501},"/\u003Cmain",{"type":36,"tag":338,"props":1503,"children":1504},{"style":345},[1505],{"type":41,"value":1176},{"type":36,"tag":338,"props":1507,"children":1508},{"style":517},[1509],{"type":41,"value":1181},{"type":36,"tag":338,"props":1511,"children":1512},{"style":351},[1513],{"type":41,"value":1186},{"type":36,"tag":338,"props":1515,"children":1516},{"style":517},[1517],{"type":41,"value":1191},{"type":36,"tag":338,"props":1519,"children":1520},{"style":357},[1521],{"type":41,"value":1196},{"type":36,"tag":338,"props":1523,"children":1524},{"style":517},[1525],{"type":41,"value":1181},{"type":36,"tag":338,"props":1527,"children":1528},{"style":357},[1529],{"type":41,"value":1205},{"type":36,"tag":338,"props":1531,"children":1532},{"style":517},[1533],{"type":41,"value":1210},{"type":36,"tag":338,"props":1535,"children":1536},{"style":357},[1537],{"type":41,"value":1215},{"type":36,"tag":338,"props":1539,"children":1540},{"style":575},[1541],{"type":41,"value":1220},{"type":36,"tag":338,"props":1543,"children":1544},{"style":357},[1545],{"type":41,"value":1546},"main>/",{"type":36,"tag":338,"props":1548,"children":1549},{"style":345},[1550],{"type":41,"value":1551},"i",{"type":36,"tag":338,"props":1553,"children":1554},{"style":351},[1555],{"type":41,"value":1244},{"type":36,"tag":338,"props":1557,"children":1558},{"class":340,"line":690},[1559,1564,1568,1573,1578,1583,1588,1593,1597,1601,1605],{"type":36,"tag":338,"props":1560,"children":1561},{"style":345},[1562],{"type":41,"value":1563},"  if",{"type":36,"tag":338,"props":1565,"children":1566},{"style":351},[1567],{"type":41,"value":623},{"type":36,"tag":338,"props":1569,"children":1570},{"style":357},[1571],{"type":41,"value":1572},"main",{"type":36,"tag":338,"props":1574,"children":1575},{"style":351},[1576],{"type":41,"value":1577},"?.[",{"type":36,"tag":338,"props":1579,"children":1580},{"style":517},[1581],{"type":41,"value":1582},"0",{"type":36,"tag":338,"props":1584,"children":1585},{"style":351},[1586],{"type":41,"value":1587},"]) ",{"type":36,"tag":338,"props":1589,"children":1590},{"style":345},[1591],{"type":41,"value":1592},"return",{"type":36,"tag":338,"props":1594,"children":1595},{"style":357},[1596],{"type":41,"value":1474},{"type":36,"tag":338,"props":1598,"children":1599},{"style":351},[1600],{"type":41,"value":1181},{"type":36,"tag":338,"props":1602,"children":1603},{"style":517},[1604],{"type":41,"value":1582},{"type":36,"tag":338,"props":1606,"children":1607},{"style":351},[1608],{"type":41,"value":1044},{"type":36,"tag":338,"props":1610,"children":1611},{"class":340,"line":699},[1612,1616,1621,1625,1629,1633,1637,1641,1646,1650,1654,1658,1662,1666,1670,1674,1678,1682,1686,1691,1695],{"type":36,"tag":338,"props":1613,"children":1614},{"style":345},[1615],{"type":41,"value":1469},{"type":36,"tag":338,"props":1617,"children":1618},{"style":433},[1619],{"type":41,"value":1620}," article",{"type":36,"tag":338,"props":1622,"children":1623},{"style":575},[1624],{"type":41,"value":578},{"type":36,"tag":338,"props":1626,"children":1627},{"style":433},[1628],{"type":41,"value":1483},{"type":36,"tag":338,"props":1630,"children":1631},{"style":351},[1632],{"type":41,"value":243},{"type":36,"tag":338,"props":1634,"children":1635},{"style":407},[1636],{"type":41,"value":1492},{"type":36,"tag":338,"props":1638,"children":1639},{"style":351},[1640],{"type":41,"value":538},{"type":36,"tag":338,"props":1642,"children":1643},{"style":357},[1644],{"type":41,"value":1645},"/\u003Carticle",{"type":36,"tag":338,"props":1647,"children":1648},{"style":345},[1649],{"type":41,"value":1176},{"type":36,"tag":338,"props":1651,"children":1652},{"style":517},[1653],{"type":41,"value":1181},{"type":36,"tag":338,"props":1655,"children":1656},{"style":351},[1657],{"type":41,"value":1186},{"type":36,"tag":338,"props":1659,"children":1660},{"style":517},[1661],{"type":41,"value":1191},{"type":36,"tag":338,"props":1663,"children":1664},{"style":357},[1665],{"type":41,"value":1196},{"type":36,"tag":338,"props":1667,"children":1668},{"style":517},[1669],{"type":41,"value":1181},{"type":36,"tag":338,"props":1671,"children":1672},{"style":357},[1673],{"type":41,"value":1205},{"type":36,"tag":338,"props":1675,"children":1676},{"style":517},[1677],{"type":41,"value":1210},{"type":36,"tag":338,"props":1679,"children":1680},{"style":357},[1681],{"type":41,"value":1215},{"type":36,"tag":338,"props":1683,"children":1684},{"style":575},[1685],{"type":41,"value":1220},{"type":36,"tag":338,"props":1687,"children":1688},{"style":357},[1689],{"type":41,"value":1690},"article>/",{"type":36,"tag":338,"props":1692,"children":1693},{"style":345},[1694],{"type":41,"value":1551},{"type":36,"tag":338,"props":1696,"children":1697},{"style":351},[1698],{"type":41,"value":1244},{"type":36,"tag":338,"props":1700,"children":1701},{"class":340,"line":709},[1702,1706,1710,1715,1719,1723,1727,1731,1735,1739,1743],{"type":36,"tag":338,"props":1703,"children":1704},{"style":345},[1705],{"type":41,"value":1563},{"type":36,"tag":338,"props":1707,"children":1708},{"style":351},[1709],{"type":41,"value":623},{"type":36,"tag":338,"props":1711,"children":1712},{"style":357},[1713],{"type":41,"value":1714},"article",{"type":36,"tag":338,"props":1716,"children":1717},{"style":351},[1718],{"type":41,"value":1577},{"type":36,"tag":338,"props":1720,"children":1721},{"style":517},[1722],{"type":41,"value":1582},{"type":36,"tag":338,"props":1724,"children":1725},{"style":351},[1726],{"type":41,"value":1587},{"type":36,"tag":338,"props":1728,"children":1729},{"style":345},[1730],{"type":41,"value":1592},{"type":36,"tag":338,"props":1732,"children":1733},{"style":357},[1734],{"type":41,"value":1620},{"type":36,"tag":338,"props":1736,"children":1737},{"style":351},[1738],{"type":41,"value":1181},{"type":36,"tag":338,"props":1740,"children":1741},{"style":517},[1742],{"type":41,"value":1582},{"type":36,"tag":338,"props":1744,"children":1745},{"style":351},[1746],{"type":41,"value":1044},{"type":36,"tag":338,"props":1748,"children":1749},{"class":340,"line":731},[1750,1754],{"type":36,"tag":338,"props":1751,"children":1752},{"style":345},[1753],{"type":41,"value":1144},{"type":36,"tag":338,"props":1755,"children":1756},{"style":357},[1757],{"type":41,"value":1149},{"type":36,"tag":338,"props":1759,"children":1760},{"class":340,"line":740},[1761],{"type":36,"tag":338,"props":1762,"children":1763},{"style":351},[1764],{"type":41,"value":1414},{"type":36,"tag":338,"props":1766,"children":1767},{"class":340,"line":748},[1768],{"type":36,"tag":338,"props":1769,"children":1770},{"emptyLinePlaceholder":387},[1771],{"type":41,"value":390},{"type":36,"tag":338,"props":1773,"children":1774},{"class":340,"line":818},[1775],{"type":36,"tag":338,"props":1776,"children":1777},{"style":703},[1778],{"type":41,"value":1779},"// Stage 3: Strip layout chrome\n",{"type":36,"tag":338,"props":1781,"children":1782},{"class":340,"line":879},[1783,1787,1792,1796,1800,1804,1808],{"type":36,"tag":338,"props":1784,"children":1785},{"style":345},[1786],{"type":41,"value":1109},{"type":36,"tag":338,"props":1788,"children":1789},{"style":407},[1790],{"type":41,"value":1791}," stripLayoutChrome",{"type":36,"tag":338,"props":1793,"children":1794},{"style":351},[1795],{"type":41,"value":538},{"type":36,"tag":338,"props":1797,"children":1798},{"style":541},[1799],{"type":41,"value":1123},{"type":36,"tag":338,"props":1801,"children":1802},{"style":351},[1803],{"type":41,"value":430},{"type":36,"tag":338,"props":1805,"children":1806},{"style":433},[1807],{"type":41,"value":1132},{"type":36,"tag":338,"props":1809,"children":1810},{"style":351},[1811],{"type":41,"value":558},{"type":36,"tag":338,"props":1813,"children":1814},{"class":340,"line":936},[1815,1819],{"type":36,"tag":338,"props":1816,"children":1817},{"style":345},[1818],{"type":41,"value":1144},{"type":36,"tag":338,"props":1820,"children":1821},{"style":357},[1822],{"type":41,"value":1149},{"type":36,"tag":338,"props":1824,"children":1825},{"class":340,"line":945},[1826,1830,1834,1838,1843,1847,1851,1855,1859,1863,1867,1871,1875,1879,1883,1888,1892,1896,1900],{"type":36,"tag":338,"props":1827,"children":1828},{"style":351},[1829],{"type":41,"value":1157},{"type":36,"tag":338,"props":1831,"children":1832},{"style":407},[1833],{"type":41,"value":1162},{"type":36,"tag":338,"props":1835,"children":1836},{"style":351},[1837],{"type":41,"value":538},{"type":36,"tag":338,"props":1839,"children":1840},{"style":357},[1841],{"type":41,"value":1842},"/\u003Cheader",{"type":36,"tag":338,"props":1844,"children":1845},{"style":345},[1846],{"type":41,"value":1176},{"type":36,"tag":338,"props":1848,"children":1849},{"style":517},[1850],{"type":41,"value":1181},{"type":36,"tag":338,"props":1852,"children":1853},{"style":351},[1854],{"type":41,"value":1186},{"type":36,"tag":338,"props":1856,"children":1857},{"style":517},[1858],{"type":41,"value":1191},{"type":36,"tag":338,"props":1860,"children":1861},{"style":357},[1862],{"type":41,"value":1196},{"type":36,"tag":338,"props":1864,"children":1865},{"style":517},[1866],{"type":41,"value":1181},{"type":36,"tag":338,"props":1868,"children":1869},{"style":357},[1870],{"type":41,"value":1205},{"type":36,"tag":338,"props":1872,"children":1873},{"style":517},[1874],{"type":41,"value":1210},{"type":36,"tag":338,"props":1876,"children":1877},{"style":357},[1878],{"type":41,"value":1215},{"type":36,"tag":338,"props":1880,"children":1881},{"style":575},[1882],{"type":41,"value":1220},{"type":36,"tag":338,"props":1884,"children":1885},{"style":357},[1886],{"type":41,"value":1887},"header>/",{"type":36,"tag":338,"props":1889,"children":1890},{"style":345},[1891],{"type":41,"value":1230},{"type":36,"tag":338,"props":1893,"children":1894},{"style":351},[1895],{"type":41,"value":474},{"type":36,"tag":338,"props":1897,"children":1898},{"style":372},[1899],{"type":41,"value":1239},{"type":36,"tag":338,"props":1901,"children":1902},{"style":351},[1903],{"type":41,"value":1244},{"type":36,"tag":338,"props":1905,"children":1906},{"class":340,"line":954},[1907,1911,1915,1919,1924,1928,1932,1936,1940,1944,1948,1952,1956,1960,1964,1969,1973,1977,1981],{"type":36,"tag":338,"props":1908,"children":1909},{"style":351},[1910],{"type":41,"value":1157},{"type":36,"tag":338,"props":1912,"children":1913},{"style":407},[1914],{"type":41,"value":1162},{"type":36,"tag":338,"props":1916,"children":1917},{"style":351},[1918],{"type":41,"value":538},{"type":36,"tag":338,"props":1920,"children":1921},{"style":357},[1922],{"type":41,"value":1923},"/\u003Cnav",{"type":36,"tag":338,"props":1925,"children":1926},{"style":345},[1927],{"type":41,"value":1176},{"type":36,"tag":338,"props":1929,"children":1930},{"style":517},[1931],{"type":41,"value":1181},{"type":36,"tag":338,"props":1933,"children":1934},{"style":351},[1935],{"type":41,"value":1186},{"type":36,"tag":338,"props":1937,"children":1938},{"style":517},[1939],{"type":41,"value":1191},{"type":36,"tag":338,"props":1941,"children":1942},{"style":357},[1943],{"type":41,"value":1196},{"type":36,"tag":338,"props":1945,"children":1946},{"style":517},[1947],{"type":41,"value":1181},{"type":36,"tag":338,"props":1949,"children":1950},{"style":357},[1951],{"type":41,"value":1205},{"type":36,"tag":338,"props":1953,"children":1954},{"style":517},[1955],{"type":41,"value":1210},{"type":36,"tag":338,"props":1957,"children":1958},{"style":357},[1959],{"type":41,"value":1215},{"type":36,"tag":338,"props":1961,"children":1962},{"style":575},[1963],{"type":41,"value":1220},{"type":36,"tag":338,"props":1965,"children":1966},{"style":357},[1967],{"type":41,"value":1968},"nav>/",{"type":36,"tag":338,"props":1970,"children":1971},{"style":345},[1972],{"type":41,"value":1230},{"type":36,"tag":338,"props":1974,"children":1975},{"style":351},[1976],{"type":41,"value":474},{"type":36,"tag":338,"props":1978,"children":1979},{"style":372},[1980],{"type":41,"value":1239},{"type":36,"tag":338,"props":1982,"children":1983},{"style":351},[1984],{"type":41,"value":1244},{"type":36,"tag":338,"props":1986,"children":1988},{"class":340,"line":1987},23,[1989,1993,1997,2001,2006,2010,2014,2018,2022,2026,2030,2034,2038,2042,2046,2051,2055,2059,2063],{"type":36,"tag":338,"props":1990,"children":1991},{"style":351},[1992],{"type":41,"value":1157},{"type":36,"tag":338,"props":1994,"children":1995},{"style":407},[1996],{"type":41,"value":1162},{"type":36,"tag":338,"props":1998,"children":1999},{"style":351},[2000],{"type":41,"value":538},{"type":36,"tag":338,"props":2002,"children":2003},{"style":357},[2004],{"type":41,"value":2005},"/\u003Cfooter",{"type":36,"tag":338,"props":2007,"children":2008},{"style":345},[2009],{"type":41,"value":1176},{"type":36,"tag":338,"props":2011,"children":2012},{"style":517},[2013],{"type":41,"value":1181},{"type":36,"tag":338,"props":2015,"children":2016},{"style":351},[2017],{"type":41,"value":1186},{"type":36,"tag":338,"props":2019,"children":2020},{"style":517},[2021],{"type":41,"value":1191},{"type":36,"tag":338,"props":2023,"children":2024},{"style":357},[2025],{"type":41,"value":1196},{"type":36,"tag":338,"props":2027,"children":2028},{"style":517},[2029],{"type":41,"value":1181},{"type":36,"tag":338,"props":2031,"children":2032},{"style":357},[2033],{"type":41,"value":1205},{"type":36,"tag":338,"props":2035,"children":2036},{"style":517},[2037],{"type":41,"value":1210},{"type":36,"tag":338,"props":2039,"children":2040},{"style":357},[2041],{"type":41,"value":1215},{"type":36,"tag":338,"props":2043,"children":2044},{"style":575},[2045],{"type":41,"value":1220},{"type":36,"tag":338,"props":2047,"children":2048},{"style":357},[2049],{"type":41,"value":2050},"footer>/",{"type":36,"tag":338,"props":2052,"children":2053},{"style":345},[2054],{"type":41,"value":1230},{"type":36,"tag":338,"props":2056,"children":2057},{"style":351},[2058],{"type":41,"value":474},{"type":36,"tag":338,"props":2060,"children":2061},{"style":372},[2062],{"type":41,"value":1239},{"type":36,"tag":338,"props":2064,"children":2065},{"style":351},[2066],{"type":41,"value":1244},{"type":36,"tag":338,"props":2068,"children":2070},{"class":340,"line":2069},24,[2071,2075,2079,2083,2088,2092,2096,2100,2104,2108,2112,2116,2120,2124,2128,2133,2137,2141,2145],{"type":36,"tag":338,"props":2072,"children":2073},{"style":351},[2074],{"type":41,"value":1157},{"type":36,"tag":338,"props":2076,"children":2077},{"style":407},[2078],{"type":41,"value":1162},{"type":36,"tag":338,"props":2080,"children":2081},{"style":351},[2082],{"type":41,"value":538},{"type":36,"tag":338,"props":2084,"children":2085},{"style":357},[2086],{"type":41,"value":2087},"/\u003Caside",{"type":36,"tag":338,"props":2089,"children":2090},{"style":345},[2091],{"type":41,"value":1176},{"type":36,"tag":338,"props":2093,"children":2094},{"style":517},[2095],{"type":41,"value":1181},{"type":36,"tag":338,"props":2097,"children":2098},{"style":351},[2099],{"type":41,"value":1186},{"type":36,"tag":338,"props":2101,"children":2102},{"style":517},[2103],{"type":41,"value":1191},{"type":36,"tag":338,"props":2105,"children":2106},{"style":357},[2107],{"type":41,"value":1196},{"type":36,"tag":338,"props":2109,"children":2110},{"style":517},[2111],{"type":41,"value":1181},{"type":36,"tag":338,"props":2113,"children":2114},{"style":357},[2115],{"type":41,"value":1205},{"type":36,"tag":338,"props":2117,"children":2118},{"style":517},[2119],{"type":41,"value":1210},{"type":36,"tag":338,"props":2121,"children":2122},{"style":357},[2123],{"type":41,"value":1215},{"type":36,"tag":338,"props":2125,"children":2126},{"style":575},[2127],{"type":41,"value":1220},{"type":36,"tag":338,"props":2129,"children":2130},{"style":357},[2131],{"type":41,"value":2132},"aside>/",{"type":36,"tag":338,"props":2134,"children":2135},{"style":345},[2136],{"type":41,"value":1230},{"type":36,"tag":338,"props":2138,"children":2139},{"style":351},[2140],{"type":41,"value":474},{"type":36,"tag":338,"props":2142,"children":2143},{"style":372},[2144],{"type":41,"value":1239},{"type":36,"tag":338,"props":2146,"children":2147},{"style":351},[2148],{"type":41,"value":1244},{"type":36,"tag":338,"props":2150,"children":2152},{"class":340,"line":2151},25,[2153,2157,2161,2165,2170,2174,2178,2182,2186,2190,2194,2198,2202,2206,2210,2215,2219,2223,2227],{"type":36,"tag":338,"props":2154,"children":2155},{"style":351},[2156],{"type":41,"value":1157},{"type":36,"tag":338,"props":2158,"children":2159},{"style":407},[2160],{"type":41,"value":1162},{"type":36,"tag":338,"props":2162,"children":2163},{"style":351},[2164],{"type":41,"value":538},{"type":36,"tag":338,"props":2166,"children":2167},{"style":357},[2168],{"type":41,"value":2169},"/\u003Cform",{"type":36,"tag":338,"props":2171,"children":2172},{"style":345},[2173],{"type":41,"value":1176},{"type":36,"tag":338,"props":2175,"children":2176},{"style":517},[2177],{"type":41,"value":1181},{"type":36,"tag":338,"props":2179,"children":2180},{"style":351},[2181],{"type":41,"value":1186},{"type":36,"tag":338,"props":2183,"children":2184},{"style":517},[2185],{"type":41,"value":1191},{"type":36,"tag":338,"props":2187,"children":2188},{"style":357},[2189],{"type":41,"value":1196},{"type":36,"tag":338,"props":2191,"children":2192},{"style":517},[2193],{"type":41,"value":1181},{"type":36,"tag":338,"props":2195,"children":2196},{"style":357},[2197],{"type":41,"value":1205},{"type":36,"tag":338,"props":2199,"children":2200},{"style":517},[2201],{"type":41,"value":1210},{"type":36,"tag":338,"props":2203,"children":2204},{"style":357},[2205],{"type":41,"value":1215},{"type":36,"tag":338,"props":2207,"children":2208},{"style":575},[2209],{"type":41,"value":1220},{"type":36,"tag":338,"props":2211,"children":2212},{"style":357},[2213],{"type":41,"value":2214},"form>/",{"type":36,"tag":338,"props":2216,"children":2217},{"style":345},[2218],{"type":41,"value":1230},{"type":36,"tag":338,"props":2220,"children":2221},{"style":351},[2222],{"type":41,"value":474},{"type":36,"tag":338,"props":2224,"children":2225},{"style":372},[2226],{"type":41,"value":1239},{"type":36,"tag":338,"props":2228,"children":2229},{"style":351},[2230],{"type":41,"value":1244},{"type":36,"tag":338,"props":2232,"children":2234},{"class":340,"line":2233},26,[2235],{"type":36,"tag":338,"props":2236,"children":2237},{"style":351},[2238],{"type":41,"value":1414},{"type":36,"tag":1046,"props":2240,"children":2242},{"id":2241},"converting-to-markdown",[2243],{"type":41,"value":2244},"Converting to markdown",{"type":36,"tag":37,"props":2246,"children":2247},{},[2248,2250,2257],{"type":41,"value":2249},"I use ",{"type":36,"tag":49,"props":2251,"children":2254},{"href":2252,"rel":2253},"https://github.com/mixmark-io/turndown",[53],[2255],{"type":41,"value":2256},"Turndown",{"type":41,"value":2258}," with ATX-style headings and fenced code blocks:",{"type":36,"tag":328,"props":2260,"children":2262},{"className":330,"code":2261,"language":332,"meta":7,"style":7},"import TurndownService from 'turndown'\n\nfunction toMarkdown(html: string) {\n  const td = new TurndownService({\n    headingStyle: 'atx',\n    codeBlockStyle: 'fenced',\n  })\n  return `${td.turndown(html).trim()}\\n`\n}\n",[2263],{"type":36,"tag":31,"props":2264,"children":2265},{"__ignoreMap":7},[2266,2288,2295,2327,2357,2379,2400,2408,2476],{"type":36,"tag":338,"props":2267,"children":2268},{"class":340,"line":341},[2269,2273,2278,2283],{"type":36,"tag":338,"props":2270,"children":2271},{"style":345},[2272],{"type":41,"value":348},{"type":36,"tag":338,"props":2274,"children":2275},{"style":357},[2276],{"type":41,"value":2277}," TurndownService",{"type":36,"tag":338,"props":2279,"children":2280},{"style":345},[2281],{"type":41,"value":2282}," from",{"type":36,"tag":338,"props":2284,"children":2285},{"style":372},[2286],{"type":41,"value":2287}," 'turndown'\n",{"type":36,"tag":338,"props":2289,"children":2290},{"class":340,"line":383},[2291],{"type":36,"tag":338,"props":2292,"children":2293},{"emptyLinePlaceholder":387},[2294],{"type":41,"value":390},{"type":36,"tag":338,"props":2296,"children":2297},{"class":340,"line":393},[2298,2302,2307,2311,2315,2319,2323],{"type":36,"tag":338,"props":2299,"children":2300},{"style":345},[2301],{"type":41,"value":1109},{"type":36,"tag":338,"props":2303,"children":2304},{"style":407},[2305],{"type":41,"value":2306}," toMarkdown",{"type":36,"tag":338,"props":2308,"children":2309},{"style":351},[2310],{"type":41,"value":538},{"type":36,"tag":338,"props":2312,"children":2313},{"style":541},[2314],{"type":41,"value":1123},{"type":36,"tag":338,"props":2316,"children":2317},{"style":351},[2318],{"type":41,"value":430},{"type":36,"tag":338,"props":2320,"children":2321},{"style":433},[2322],{"type":41,"value":1132},{"type":36,"tag":338,"props":2324,"children":2325},{"style":351},[2326],{"type":41,"value":558},{"type":36,"tag":338,"props":2328,"children":2329},{"class":340,"line":444},[2330,2334,2339,2343,2348,2352],{"type":36,"tag":338,"props":2331,"children":2332},{"style":345},[2333],{"type":41,"value":1469},{"type":36,"tag":338,"props":2335,"children":2336},{"style":433},[2337],{"type":41,"value":2338}," td",{"type":36,"tag":338,"props":2340,"children":2341},{"style":575},[2342],{"type":41,"value":578},{"type":36,"tag":338,"props":2344,"children":2345},{"style":345},[2346],{"type":41,"value":2347}," new",{"type":36,"tag":338,"props":2349,"children":2350},{"style":407},[2351],{"type":41,"value":2277},{"type":36,"tag":338,"props":2353,"children":2354},{"style":351},[2355],{"type":41,"value":2356},"({\n",{"type":36,"tag":338,"props":2358,"children":2359},{"class":340,"line":496},[2360,2365,2369,2374],{"type":36,"tag":338,"props":2361,"children":2362},{"style":357},[2363],{"type":41,"value":2364},"    headingStyle",{"type":36,"tag":338,"props":2366,"children":2367},{"style":351},[2368],{"type":41,"value":430},{"type":36,"tag":338,"props":2370,"children":2371},{"style":372},[2372],{"type":41,"value":2373},"'atx'",{"type":36,"tag":338,"props":2375,"children":2376},{"style":351},[2377],{"type":41,"value":2378},",\n",{"type":36,"tag":338,"props":2380,"children":2381},{"class":340,"line":527},[2382,2387,2391,2396],{"type":36,"tag":338,"props":2383,"children":2384},{"style":357},[2385],{"type":41,"value":2386},"    codeBlockStyle",{"type":36,"tag":338,"props":2388,"children":2389},{"style":351},[2390],{"type":41,"value":430},{"type":36,"tag":338,"props":2392,"children":2393},{"style":372},[2394],{"type":41,"value":2395},"'fenced'",{"type":36,"tag":338,"props":2397,"children":2398},{"style":351},[2399],{"type":41,"value":2378},{"type":36,"tag":338,"props":2401,"children":2402},{"class":340,"line":561},[2403],{"type":36,"tag":338,"props":2404,"children":2405},{"style":351},[2406],{"type":41,"value":2407},"  })\n",{"type":36,"tag":338,"props":2409,"children":2410},{"class":340,"line":590},[2411,2415,2420,2425,2430,2434,2439,2443,2447,2451,2456,2461,2466,2471],{"type":36,"tag":338,"props":2412,"children":2413},{"style":345},[2414],{"type":41,"value":1144},{"type":36,"tag":338,"props":2416,"children":2417},{"style":372},[2418],{"type":41,"value":2419}," `",{"type":36,"tag":338,"props":2421,"children":2422},{"style":345},[2423],{"type":41,"value":2424},"${",{"type":36,"tag":338,"props":2426,"children":2427},{"style":433},[2428],{"type":41,"value":2429},"td",{"type":36,"tag":338,"props":2431,"children":2432},{"style":351},[2433],{"type":41,"value":243},{"type":36,"tag":338,"props":2435,"children":2436},{"style":407},[2437],{"type":41,"value":2438},"turndown",{"type":36,"tag":338,"props":2440,"children":2441},{"style":351},[2442],{"type":41,"value":538},{"type":36,"tag":338,"props":2444,"children":2445},{"style":357},[2446],{"type":41,"value":1123},{"type":36,"tag":338,"props":2448,"children":2449},{"style":351},[2450],{"type":41,"value":190},{"type":36,"tag":338,"props":2452,"children":2453},{"style":407},[2454],{"type":41,"value":2455},"trim",{"type":36,"tag":338,"props":2457,"children":2458},{"style":351},[2459],{"type":41,"value":2460},"()",{"type":36,"tag":338,"props":2462,"children":2463},{"style":345},[2464],{"type":41,"value":2465},"}",{"type":36,"tag":338,"props":2467,"children":2468},{"style":575},[2469],{"type":41,"value":2470},"\\n",{"type":36,"tag":338,"props":2472,"children":2473},{"style":372},[2474],{"type":41,"value":2475},"`\n",{"type":36,"tag":338,"props":2477,"children":2478},{"class":340,"line":598},[2479],{"type":36,"tag":338,"props":2480,"children":2481},{"style":351},[2482],{"type":41,"value":1414},{"type":36,"tag":1046,"props":2484,"children":2486},{"id":2485},"metadata-and-frontmatter",[2487],{"type":41,"value":2488},"Metadata and frontmatter",{"type":36,"tag":37,"props":2490,"children":2491},{},[2492,2494,2500,2501,2507,2509,2515,2517,2523,2525,2531,2533,2539,2541,2547,2549,2555,2557,2563,2565,2571,2573,2579,2580,2586],{"type":41,"value":2493},"Each markdown file gets a YAML frontmatter block with ",{"type":36,"tag":31,"props":2495,"children":2497},{"className":2496},[],[2498],{"type":41,"value":2499},"title",{"type":41,"value":474},{"type":36,"tag":31,"props":2502,"children":2504},{"className":2503},[],[2505],{"type":41,"value":2506},"description",{"type":41,"value":2508},", and ",{"type":36,"tag":31,"props":2510,"children":2512},{"className":2511},[],[2513],{"type":41,"value":2514},"image",{"type":41,"value":2516},", extracted from the page's ",{"type":36,"tag":31,"props":2518,"children":2520},{"className":2519},[],[2521],{"type":41,"value":2522},"\u003Cmeta>",{"type":41,"value":2524}," tags. For title I check ",{"type":36,"tag":31,"props":2526,"children":2528},{"className":2527},[],[2529],{"type":41,"value":2530},"og:title",{"type":41,"value":2532}," first, then ",{"type":36,"tag":31,"props":2534,"children":2536},{"className":2535},[],[2537],{"type":41,"value":2538},"twitter:title",{"type":41,"value":2540},", then ",{"type":36,"tag":31,"props":2542,"children":2544},{"className":2543},[],[2545],{"type":41,"value":2546},"\u003Ctitle>",{"type":41,"value":2548},". Description starts with the standard ",{"type":36,"tag":31,"props":2550,"children":2552},{"className":2551},[],[2553],{"type":41,"value":2554},"\u003Cmeta name=\"description\">",{"type":41,"value":2556},", then falls back to ",{"type":36,"tag":31,"props":2558,"children":2560},{"className":2559},[],[2561],{"type":41,"value":2562},"og:description",{"type":41,"value":2564}," and ",{"type":36,"tag":31,"props":2566,"children":2568},{"className":2567},[],[2569],{"type":41,"value":2570},"twitter:description",{"type":41,"value":2572},". Image follows the OG-first pattern: ",{"type":36,"tag":31,"props":2574,"children":2576},{"className":2575},[],[2577],{"type":41,"value":2578},"og:image",{"type":41,"value":2540},{"type":36,"tag":31,"props":2581,"children":2583},{"className":2582},[],[2584],{"type":41,"value":2585},"twitter:image",{"type":41,"value":243},{"type":36,"tag":328,"props":2588,"children":2590},{"className":330,"code":2589,"language":332,"meta":7,"style":7},"function readPageMetadata(html: string): PageMetadata {\n  const head = extractHead(html)\n  return {\n    title: getMetaContent(head, 'property', 'og:title')\n      || getMetaContent(head, 'name', 'twitter:title')\n      || extractTitle(head),\n    description: getMetaContent(head, 'name', 'description')\n      || getMetaContent(head, 'property', 'og:description'),\n    image: getMetaContent(head, 'property', 'og:image')\n      || getMetaContent(head, 'name', 'twitter:image'),\n  }\n}\n",[2591],{"type":36,"tag":31,"props":2592,"children":2593},{"__ignoreMap":7},[2594,2636,2669,2680,2728,2771,2796,2841,2881,2926,2966,2974],{"type":36,"tag":338,"props":2595,"children":2596},{"class":340,"line":341},[2597,2601,2606,2610,2614,2618,2622,2627,2632],{"type":36,"tag":338,"props":2598,"children":2599},{"style":345},[2600],{"type":41,"value":1109},{"type":36,"tag":338,"props":2602,"children":2603},{"style":407},[2604],{"type":41,"value":2605}," readPageMetadata",{"type":36,"tag":338,"props":2607,"children":2608},{"style":351},[2609],{"type":41,"value":538},{"type":36,"tag":338,"props":2611,"children":2612},{"style":541},[2613],{"type":41,"value":1123},{"type":36,"tag":338,"props":2615,"children":2616},{"style":351},[2617],{"type":41,"value":430},{"type":36,"tag":338,"props":2619,"children":2620},{"style":433},[2621],{"type":41,"value":1132},{"type":36,"tag":338,"props":2623,"children":2624},{"style":351},[2625],{"type":41,"value":2626},"): ",{"type":36,"tag":338,"props":2628,"children":2629},{"style":433},[2630],{"type":41,"value":2631},"PageMetadata",{"type":36,"tag":338,"props":2633,"children":2634},{"style":351},[2635],{"type":41,"value":652},{"type":36,"tag":338,"props":2637,"children":2638},{"class":340,"line":383},[2639,2643,2648,2652,2657,2661,2665],{"type":36,"tag":338,"props":2640,"children":2641},{"style":345},[2642],{"type":41,"value":1469},{"type":36,"tag":338,"props":2644,"children":2645},{"style":433},[2646],{"type":41,"value":2647}," head",{"type":36,"tag":338,"props":2649,"children":2650},{"style":575},[2651],{"type":41,"value":578},{"type":36,"tag":338,"props":2653,"children":2654},{"style":407},[2655],{"type":41,"value":2656}," extractHead",{"type":36,"tag":338,"props":2658,"children":2659},{"style":351},[2660],{"type":41,"value":538},{"type":36,"tag":338,"props":2662,"children":2663},{"style":357},[2664],{"type":41,"value":1123},{"type":36,"tag":338,"props":2666,"children":2667},{"style":351},[2668],{"type":41,"value":1244},{"type":36,"tag":338,"props":2670,"children":2671},{"class":340,"line":393},[2672,2676],{"type":36,"tag":338,"props":2673,"children":2674},{"style":345},[2675],{"type":41,"value":1144},{"type":36,"tag":338,"props":2677,"children":2678},{"style":351},[2679],{"type":41,"value":652},{"type":36,"tag":338,"props":2681,"children":2682},{"class":340,"line":444},[2683,2688,2692,2697,2701,2706,2710,2715,2719,2724],{"type":36,"tag":338,"props":2684,"children":2685},{"style":357},[2686],{"type":41,"value":2687},"    title",{"type":36,"tag":338,"props":2689,"children":2690},{"style":351},[2691],{"type":41,"value":430},{"type":36,"tag":338,"props":2693,"children":2694},{"style":407},[2695],{"type":41,"value":2696},"getMetaContent",{"type":36,"tag":338,"props":2698,"children":2699},{"style":351},[2700],{"type":41,"value":538},{"type":36,"tag":338,"props":2702,"children":2703},{"style":357},[2704],{"type":41,"value":2705},"head",{"type":36,"tag":338,"props":2707,"children":2708},{"style":351},[2709],{"type":41,"value":474},{"type":36,"tag":338,"props":2711,"children":2712},{"style":372},[2713],{"type":41,"value":2714},"'property'",{"type":36,"tag":338,"props":2716,"children":2717},{"style":351},[2718],{"type":41,"value":474},{"type":36,"tag":338,"props":2720,"children":2721},{"style":372},[2722],{"type":41,"value":2723},"'og:title'",{"type":36,"tag":338,"props":2725,"children":2726},{"style":351},[2727],{"type":41,"value":1244},{"type":36,"tag":338,"props":2729,"children":2730},{"class":340,"line":496},[2731,2736,2741,2745,2749,2753,2758,2762,2767],{"type":36,"tag":338,"props":2732,"children":2733},{"style":575},[2734],{"type":41,"value":2735},"      ||",{"type":36,"tag":338,"props":2737,"children":2738},{"style":407},[2739],{"type":41,"value":2740}," getMetaContent",{"type":36,"tag":338,"props":2742,"children":2743},{"style":351},[2744],{"type":41,"value":538},{"type":36,"tag":338,"props":2746,"children":2747},{"style":357},[2748],{"type":41,"value":2705},{"type":36,"tag":338,"props":2750,"children":2751},{"style":351},[2752],{"type":41,"value":474},{"type":36,"tag":338,"props":2754,"children":2755},{"style":372},[2756],{"type":41,"value":2757},"'name'",{"type":36,"tag":338,"props":2759,"children":2760},{"style":351},[2761],{"type":41,"value":474},{"type":36,"tag":338,"props":2763,"children":2764},{"style":372},[2765],{"type":41,"value":2766},"'twitter:title'",{"type":36,"tag":338,"props":2768,"children":2769},{"style":351},[2770],{"type":41,"value":1244},{"type":36,"tag":338,"props":2772,"children":2773},{"class":340,"line":527},[2774,2778,2783,2787,2791],{"type":36,"tag":338,"props":2775,"children":2776},{"style":575},[2777],{"type":41,"value":2735},{"type":36,"tag":338,"props":2779,"children":2780},{"style":407},[2781],{"type":41,"value":2782}," extractTitle",{"type":36,"tag":338,"props":2784,"children":2785},{"style":351},[2786],{"type":41,"value":538},{"type":36,"tag":338,"props":2788,"children":2789},{"style":357},[2790],{"type":41,"value":2705},{"type":36,"tag":338,"props":2792,"children":2793},{"style":351},[2794],{"type":41,"value":2795},"),\n",{"type":36,"tag":338,"props":2797,"children":2798},{"class":340,"line":561},[2799,2804,2808,2812,2816,2820,2824,2828,2832,2837],{"type":36,"tag":338,"props":2800,"children":2801},{"style":357},[2802],{"type":41,"value":2803},"    description",{"type":36,"tag":338,"props":2805,"children":2806},{"style":351},[2807],{"type":41,"value":430},{"type":36,"tag":338,"props":2809,"children":2810},{"style":407},[2811],{"type":41,"value":2696},{"type":36,"tag":338,"props":2813,"children":2814},{"style":351},[2815],{"type":41,"value":538},{"type":36,"tag":338,"props":2817,"children":2818},{"style":357},[2819],{"type":41,"value":2705},{"type":36,"tag":338,"props":2821,"children":2822},{"style":351},[2823],{"type":41,"value":474},{"type":36,"tag":338,"props":2825,"children":2826},{"style":372},[2827],{"type":41,"value":2757},{"type":36,"tag":338,"props":2829,"children":2830},{"style":351},[2831],{"type":41,"value":474},{"type":36,"tag":338,"props":2833,"children":2834},{"style":372},[2835],{"type":41,"value":2836},"'description'",{"type":36,"tag":338,"props":2838,"children":2839},{"style":351},[2840],{"type":41,"value":1244},{"type":36,"tag":338,"props":2842,"children":2843},{"class":340,"line":590},[2844,2848,2852,2856,2860,2864,2868,2872,2877],{"type":36,"tag":338,"props":2845,"children":2846},{"style":575},[2847],{"type":41,"value":2735},{"type":36,"tag":338,"props":2849,"children":2850},{"style":407},[2851],{"type":41,"value":2740},{"type":36,"tag":338,"props":2853,"children":2854},{"style":351},[2855],{"type":41,"value":538},{"type":36,"tag":338,"props":2857,"children":2858},{"style":357},[2859],{"type":41,"value":2705},{"type":36,"tag":338,"props":2861,"children":2862},{"style":351},[2863],{"type":41,"value":474},{"type":36,"tag":338,"props":2865,"children":2866},{"style":372},[2867],{"type":41,"value":2714},{"type":36,"tag":338,"props":2869,"children":2870},{"style":351},[2871],{"type":41,"value":474},{"type":36,"tag":338,"props":2873,"children":2874},{"style":372},[2875],{"type":41,"value":2876},"'og:description'",{"type":36,"tag":338,"props":2878,"children":2879},{"style":351},[2880],{"type":41,"value":2795},{"type":36,"tag":338,"props":2882,"children":2883},{"class":340,"line":598},[2884,2889,2893,2897,2901,2905,2909,2913,2917,2922],{"type":36,"tag":338,"props":2885,"children":2886},{"style":357},[2887],{"type":41,"value":2888},"    image",{"type":36,"tag":338,"props":2890,"children":2891},{"style":351},[2892],{"type":41,"value":430},{"type":36,"tag":338,"props":2894,"children":2895},{"style":407},[2896],{"type":41,"value":2696},{"type":36,"tag":338,"props":2898,"children":2899},{"style":351},[2900],{"type":41,"value":538},{"type":36,"tag":338,"props":2902,"children":2903},{"style":357},[2904],{"type":41,"value":2705},{"type":36,"tag":338,"props":2906,"children":2907},{"style":351},[2908],{"type":41,"value":474},{"type":36,"tag":338,"props":2910,"children":2911},{"style":372},[2912],{"type":41,"value":2714},{"type":36,"tag":338,"props":2914,"children":2915},{"style":351},[2916],{"type":41,"value":474},{"type":36,"tag":338,"props":2918,"children":2919},{"style":372},[2920],{"type":41,"value":2921},"'og:image'",{"type":36,"tag":338,"props":2923,"children":2924},{"style":351},[2925],{"type":41,"value":1244},{"type":36,"tag":338,"props":2927,"children":2928},{"class":340,"line":655},[2929,2933,2937,2941,2945,2949,2953,2957,2962],{"type":36,"tag":338,"props":2930,"children":2931},{"style":575},[2932],{"type":41,"value":2735},{"type":36,"tag":338,"props":2934,"children":2935},{"style":407},[2936],{"type":41,"value":2740},{"type":36,"tag":338,"props":2938,"children":2939},{"style":351},[2940],{"type":41,"value":538},{"type":36,"tag":338,"props":2942,"children":2943},{"style":357},[2944],{"type":41,"value":2705},{"type":36,"tag":338,"props":2946,"children":2947},{"style":351},[2948],{"type":41,"value":474},{"type":36,"tag":338,"props":2950,"children":2951},{"style":372},[2952],{"type":41,"value":2757},{"type":36,"tag":338,"props":2954,"children":2955},{"style":351},[2956],{"type":41,"value":474},{"type":36,"tag":338,"props":2958,"children":2959},{"style":372},[2960],{"type":41,"value":2961},"'twitter:image'",{"type":36,"tag":338,"props":2963,"children":2964},{"style":351},[2965],{"type":41,"value":2795},{"type":36,"tag":338,"props":2967,"children":2968},{"class":340,"line":677},[2969],{"type":36,"tag":338,"props":2970,"children":2971},{"style":351},[2972],{"type":41,"value":2973},"  }\n",{"type":36,"tag":338,"props":2975,"children":2976},{"class":340,"line":690},[2977],{"type":36,"tag":338,"props":2978,"children":2979},{"style":351},[2980],{"type":41,"value":1414},{"type":36,"tag":37,"props":2982,"children":2983},{},[2984],{"type":41,"value":2985},"The markdown is then generated from the final rendered HTML, not from the CMS source. This matters - you get the same content that the browser renders, not whatever the CMS stored before template processing.",{"type":36,"tag":1046,"props":2987,"children":2989},{"id":2988},"the-result-contentmd-next-to-every-indexhtml",[2990],{"type":41,"value":2991},"The result: content.md next to every index.html",{"type":36,"tag":37,"props":2993,"children":2994},{},[2995,2997,3002,3004,3009,3011,3017,3019,3025],{"type":41,"value":2996},"This is what the whole build step is for. Every nuxt prerendered ",{"type":36,"tag":31,"props":2998,"children":3000},{"className":2999},[],[3001],{"type":41,"value":141},{"type":41,"value":3003}," gets a sibling ",{"type":36,"tag":31,"props":3005,"children":3007},{"className":3006},[],[3008],{"type":41,"value":133},{"type":41,"value":3010}," file in the same folder. If ",{"type":36,"tag":31,"props":3012,"children":3014},{"className":3013},[],[3015],{"type":41,"value":3016},"/services/example/index.html",{"type":41,"value":3018}," exists, so does ",{"type":36,"tag":31,"props":3020,"children":3022},{"className":3021},[],[3023],{"type":41,"value":3024},"/services/example/content.md",{"type":41,"value":3026},". That's the shape I wanted, because it makes the hosting layer's job almost... boring: just a header check and pick one of two files that are guaranteed to be there.",{"type":36,"tag":37,"props":3028,"children":3029},{},[3030,3035],{"type":36,"tag":106,"props":3031,"children":3032},{},[3033],{"type":41,"value":3034},"If you are not using Nuxt",{"type":41,"value":3036},", the same logic works as a standalone Node.js script that runs after your SSG build. The only Nuxt-specific part is the hook registration. The rest - file discovery, cleaning, conversion, writing - is plain Node.",{"type":36,"tag":163,"props":3038,"children":3039},{},[],{"type":36,"tag":167,"props":3041,"children":3043},{"id":3042},"how-does-vercel-know-which-file-to-serve",[3044],{"type":41,"value":3045},"How does Vercel know which file to serve?",{"type":36,"tag":37,"props":3047,"children":3048},{},[3049,3051,3056,3058,3064],{"type":41,"value":3050},"The routing layer is where the content negotiation lives. On Vercel, I use the ",{"type":36,"tag":31,"props":3052,"children":3054},{"className":3053},[],[3055],{"type":41,"value":254},{"type":41,"value":3057}," configuration in ",{"type":36,"tag":31,"props":3059,"children":3061},{"className":3060},[],[3062],{"type":41,"value":3063},"vercel.json",{"type":41,"value":980},{"type":36,"tag":328,"props":3066,"children":3070},{"className":3067,"code":3068,"language":3069,"meta":7,"style":7},"language-json shiki shiki-themes one-dark-pro","{\n  \"routes\": [\n    {\n      \"src\": \"/\",\n      \"has\": [{ \"type\": \"header\", \"key\": \"accept\", \"value\": { \"pre\": \"text/markdown\" } }],\n      \"headers\": {\n        \"Content-Type\": \"text/markdown; charset=utf-8\",\n        \"Vary\": \"Accept\"\n      },\n      \"dest\": \"/content.md\"\n    },\n    {\n      \"src\": \"/(?\u003Cpath>(?!.*\\\\.[^/]+$).+?)/?\",\n      \"has\": [{ \"type\": \"header\", \"key\": \"accept\", \"value\": { \"pre\": \"text/markdown\" } }],\n      \"headers\": {\n        \"Content-Type\": \"text/markdown; charset=utf-8\",\n        \"Vary\": \"Accept\"\n      },\n      \"dest\": \"/$path/content.md\"\n    },\n    {\n      \"src\": \"/\",\n      \"headers\": { \"Vary\": \"Accept\" },\n      \"continue\": true\n    },\n    {\n      \"src\": \"/(?\u003Cpath>(?!.*\\\\.[^/]+$).+?)/?\",\n      \"headers\": { \"Vary\": \"Accept\" },\n      \"continue\": true\n    }\n  ]\n}\n","json",[3071],{"type":36,"tag":31,"props":3072,"children":3073},{"__ignoreMap":7},[3074,3082,3094,3102,3123,3200,3213,3234,3251,3259,3276,3284,3291,3321,3388,3399,3418,3433,3440,3456,3463,3470,3489,3518,3535,3542,3549,3577,3605,3621,3630,3639],{"type":36,"tag":338,"props":3075,"children":3076},{"class":340,"line":341},[3077],{"type":36,"tag":338,"props":3078,"children":3079},{"style":351},[3080],{"type":41,"value":3081},"{\n",{"type":36,"tag":338,"props":3083,"children":3084},{"class":340,"line":383},[3085,3090],{"type":36,"tag":338,"props":3086,"children":3087},{"style":357},[3088],{"type":41,"value":3089},"  \"routes\"",{"type":36,"tag":338,"props":3091,"children":3092},{"style":351},[3093],{"type":41,"value":1000},{"type":36,"tag":338,"props":3095,"children":3096},{"class":340,"line":393},[3097],{"type":36,"tag":338,"props":3098,"children":3099},{"style":351},[3100],{"type":41,"value":3101},"    {\n",{"type":36,"tag":338,"props":3103,"children":3104},{"class":340,"line":444},[3105,3110,3114,3119],{"type":36,"tag":338,"props":3106,"children":3107},{"style":357},[3108],{"type":41,"value":3109},"      \"src\"",{"type":36,"tag":338,"props":3111,"children":3112},{"style":351},[3113],{"type":41,"value":430},{"type":36,"tag":338,"props":3115,"children":3116},{"style":372},[3117],{"type":41,"value":3118},"\"/\"",{"type":36,"tag":338,"props":3120,"children":3121},{"style":351},[3122],{"type":41,"value":2378},{"type":36,"tag":338,"props":3124,"children":3125},{"class":340,"line":496},[3126,3131,3136,3141,3145,3150,3154,3159,3163,3168,3172,3177,3181,3186,3190,3195],{"type":36,"tag":338,"props":3127,"children":3128},{"style":357},[3129],{"type":41,"value":3130},"      \"has\"",{"type":36,"tag":338,"props":3132,"children":3133},{"style":351},[3134],{"type":41,"value":3135},": [{ ",{"type":36,"tag":338,"props":3137,"children":3138},{"style":357},[3139],{"type":41,"value":3140},"\"type\"",{"type":36,"tag":338,"props":3142,"children":3143},{"style":351},[3144],{"type":41,"value":430},{"type":36,"tag":338,"props":3146,"children":3147},{"style":372},[3148],{"type":41,"value":3149},"\"header\"",{"type":36,"tag":338,"props":3151,"children":3152},{"style":351},[3153],{"type":41,"value":474},{"type":36,"tag":338,"props":3155,"children":3156},{"style":357},[3157],{"type":41,"value":3158},"\"key\"",{"type":36,"tag":338,"props":3160,"children":3161},{"style":351},[3162],{"type":41,"value":430},{"type":36,"tag":338,"props":3164,"children":3165},{"style":372},[3166],{"type":41,"value":3167},"\"accept\"",{"type":36,"tag":338,"props":3169,"children":3170},{"style":351},[3171],{"type":41,"value":474},{"type":36,"tag":338,"props":3173,"children":3174},{"style":357},[3175],{"type":41,"value":3176},"\"value\"",{"type":36,"tag":338,"props":3178,"children":3179},{"style":351},[3180],{"type":41,"value":455},{"type":36,"tag":338,"props":3182,"children":3183},{"style":357},[3184],{"type":41,"value":3185},"\"pre\"",{"type":36,"tag":338,"props":3187,"children":3188},{"style":351},[3189],{"type":41,"value":430},{"type":36,"tag":338,"props":3191,"children":3192},{"style":372},[3193],{"type":41,"value":3194},"\"text/markdown\"",{"type":36,"tag":338,"props":3196,"children":3197},{"style":351},[3198],{"type":41,"value":3199}," } }],\n",{"type":36,"tag":338,"props":3201,"children":3202},{"class":340,"line":527},[3203,3208],{"type":36,"tag":338,"props":3204,"children":3205},{"style":357},[3206],{"type":41,"value":3207},"      \"headers\"",{"type":36,"tag":338,"props":3209,"children":3210},{"style":351},[3211],{"type":41,"value":3212},": {\n",{"type":36,"tag":338,"props":3214,"children":3215},{"class":340,"line":561},[3216,3221,3225,3230],{"type":36,"tag":338,"props":3217,"children":3218},{"style":357},[3219],{"type":41,"value":3220},"        \"Content-Type\"",{"type":36,"tag":338,"props":3222,"children":3223},{"style":351},[3224],{"type":41,"value":430},{"type":36,"tag":338,"props":3226,"children":3227},{"style":372},[3228],{"type":41,"value":3229},"\"text/markdown; charset=utf-8\"",{"type":36,"tag":338,"props":3231,"children":3232},{"style":351},[3233],{"type":41,"value":2378},{"type":36,"tag":338,"props":3235,"children":3236},{"class":340,"line":590},[3237,3242,3246],{"type":36,"tag":338,"props":3238,"children":3239},{"style":357},[3240],{"type":41,"value":3241},"        \"Vary\"",{"type":36,"tag":338,"props":3243,"children":3244},{"style":351},[3245],{"type":41,"value":430},{"type":36,"tag":338,"props":3247,"children":3248},{"style":372},[3249],{"type":41,"value":3250},"\"Accept\"\n",{"type":36,"tag":338,"props":3252,"children":3253},{"class":340,"line":598},[3254],{"type":36,"tag":338,"props":3255,"children":3256},{"style":351},[3257],{"type":41,"value":3258},"      },\n",{"type":36,"tag":338,"props":3260,"children":3261},{"class":340,"line":655},[3262,3267,3271],{"type":36,"tag":338,"props":3263,"children":3264},{"style":357},[3265],{"type":41,"value":3266},"      \"dest\"",{"type":36,"tag":338,"props":3268,"children":3269},{"style":351},[3270],{"type":41,"value":430},{"type":36,"tag":338,"props":3272,"children":3273},{"style":372},[3274],{"type":41,"value":3275},"\"/content.md\"\n",{"type":36,"tag":338,"props":3277,"children":3278},{"class":340,"line":677},[3279],{"type":36,"tag":338,"props":3280,"children":3281},{"style":351},[3282],{"type":41,"value":3283},"    },\n",{"type":36,"tag":338,"props":3285,"children":3286},{"class":340,"line":690},[3287],{"type":36,"tag":338,"props":3288,"children":3289},{"style":351},[3290],{"type":41,"value":3101},{"type":36,"tag":338,"props":3292,"children":3293},{"class":340,"line":699},[3294,3298,3302,3307,3312,3317],{"type":36,"tag":338,"props":3295,"children":3296},{"style":357},[3297],{"type":41,"value":3109},{"type":36,"tag":338,"props":3299,"children":3300},{"style":351},[3301],{"type":41,"value":430},{"type":36,"tag":338,"props":3303,"children":3304},{"style":372},[3305],{"type":41,"value":3306},"\"/(?\u003Cpath>(?!.*",{"type":36,"tag":338,"props":3308,"children":3309},{"style":575},[3310],{"type":41,"value":3311},"\\\\",{"type":36,"tag":338,"props":3313,"children":3314},{"style":372},[3315],{"type":41,"value":3316},".[^/]+$).+?)/?\"",{"type":36,"tag":338,"props":3318,"children":3319},{"style":351},[3320],{"type":41,"value":2378},{"type":36,"tag":338,"props":3322,"children":3323},{"class":340,"line":709},[3324,3328,3332,3336,3340,3344,3348,3352,3356,3360,3364,3368,3372,3376,3380,3384],{"type":36,"tag":338,"props":3325,"children":3326},{"style":357},[3327],{"type":41,"value":3130},{"type":36,"tag":338,"props":3329,"children":3330},{"style":351},[3331],{"type":41,"value":3135},{"type":36,"tag":338,"props":3333,"children":3334},{"style":357},[3335],{"type":41,"value":3140},{"type":36,"tag":338,"props":3337,"children":3338},{"style":351},[3339],{"type":41,"value":430},{"type":36,"tag":338,"props":3341,"children":3342},{"style":372},[3343],{"type":41,"value":3149},{"type":36,"tag":338,"props":3345,"children":3346},{"style":351},[3347],{"type":41,"value":474},{"type":36,"tag":338,"props":3349,"children":3350},{"style":357},[3351],{"type":41,"value":3158},{"type":36,"tag":338,"props":3353,"children":3354},{"style":351},[3355],{"type":41,"value":430},{"type":36,"tag":338,"props":3357,"children":3358},{"style":372},[3359],{"type":41,"value":3167},{"type":36,"tag":338,"props":3361,"children":3362},{"style":351},[3363],{"type":41,"value":474},{"type":36,"tag":338,"props":3365,"children":3366},{"style":357},[3367],{"type":41,"value":3176},{"type":36,"tag":338,"props":3369,"children":3370},{"style":351},[3371],{"type":41,"value":455},{"type":36,"tag":338,"props":3373,"children":3374},{"style":357},[3375],{"type":41,"value":3185},{"type":36,"tag":338,"props":3377,"children":3378},{"style":351},[3379],{"type":41,"value":430},{"type":36,"tag":338,"props":3381,"children":3382},{"style":372},[3383],{"type":41,"value":3194},{"type":36,"tag":338,"props":3385,"children":3386},{"style":351},[3387],{"type":41,"value":3199},{"type":36,"tag":338,"props":3389,"children":3390},{"class":340,"line":731},[3391,3395],{"type":36,"tag":338,"props":3392,"children":3393},{"style":357},[3394],{"type":41,"value":3207},{"type":36,"tag":338,"props":3396,"children":3397},{"style":351},[3398],{"type":41,"value":3212},{"type":36,"tag":338,"props":3400,"children":3401},{"class":340,"line":740},[3402,3406,3410,3414],{"type":36,"tag":338,"props":3403,"children":3404},{"style":357},[3405],{"type":41,"value":3220},{"type":36,"tag":338,"props":3407,"children":3408},{"style":351},[3409],{"type":41,"value":430},{"type":36,"tag":338,"props":3411,"children":3412},{"style":372},[3413],{"type":41,"value":3229},{"type":36,"tag":338,"props":3415,"children":3416},{"style":351},[3417],{"type":41,"value":2378},{"type":36,"tag":338,"props":3419,"children":3420},{"class":340,"line":748},[3421,3425,3429],{"type":36,"tag":338,"props":3422,"children":3423},{"style":357},[3424],{"type":41,"value":3241},{"type":36,"tag":338,"props":3426,"children":3427},{"style":351},[3428],{"type":41,"value":430},{"type":36,"tag":338,"props":3430,"children":3431},{"style":372},[3432],{"type":41,"value":3250},{"type":36,"tag":338,"props":3434,"children":3435},{"class":340,"line":818},[3436],{"type":36,"tag":338,"props":3437,"children":3438},{"style":351},[3439],{"type":41,"value":3258},{"type":36,"tag":338,"props":3441,"children":3442},{"class":340,"line":879},[3443,3447,3451],{"type":36,"tag":338,"props":3444,"children":3445},{"style":357},[3446],{"type":41,"value":3266},{"type":36,"tag":338,"props":3448,"children":3449},{"style":351},[3450],{"type":41,"value":430},{"type":36,"tag":338,"props":3452,"children":3453},{"style":372},[3454],{"type":41,"value":3455},"\"/$path/content.md\"\n",{"type":36,"tag":338,"props":3457,"children":3458},{"class":340,"line":936},[3459],{"type":36,"tag":338,"props":3460,"children":3461},{"style":351},[3462],{"type":41,"value":3283},{"type":36,"tag":338,"props":3464,"children":3465},{"class":340,"line":945},[3466],{"type":36,"tag":338,"props":3467,"children":3468},{"style":351},[3469],{"type":41,"value":3101},{"type":36,"tag":338,"props":3471,"children":3472},{"class":340,"line":954},[3473,3477,3481,3485],{"type":36,"tag":338,"props":3474,"children":3475},{"style":357},[3476],{"type":41,"value":3109},{"type":36,"tag":338,"props":3478,"children":3479},{"style":351},[3480],{"type":41,"value":430},{"type":36,"tag":338,"props":3482,"children":3483},{"style":372},[3484],{"type":41,"value":3118},{"type":36,"tag":338,"props":3486,"children":3487},{"style":351},[3488],{"type":41,"value":2378},{"type":36,"tag":338,"props":3490,"children":3491},{"class":340,"line":1987},[3492,3496,3500,3505,3509,3514],{"type":36,"tag":338,"props":3493,"children":3494},{"style":357},[3495],{"type":41,"value":3207},{"type":36,"tag":338,"props":3497,"children":3498},{"style":351},[3499],{"type":41,"value":455},{"type":36,"tag":338,"props":3501,"children":3502},{"style":357},[3503],{"type":41,"value":3504},"\"Vary\"",{"type":36,"tag":338,"props":3506,"children":3507},{"style":351},[3508],{"type":41,"value":430},{"type":36,"tag":338,"props":3510,"children":3511},{"style":372},[3512],{"type":41,"value":3513},"\"Accept\"",{"type":36,"tag":338,"props":3515,"children":3516},{"style":351},[3517],{"type":41,"value":493},{"type":36,"tag":338,"props":3519,"children":3520},{"class":340,"line":2069},[3521,3526,3530],{"type":36,"tag":338,"props":3522,"children":3523},{"style":357},[3524],{"type":41,"value":3525},"      \"continue\"",{"type":36,"tag":338,"props":3527,"children":3528},{"style":351},[3529],{"type":41,"value":430},{"type":36,"tag":338,"props":3531,"children":3532},{"style":517},[3533],{"type":41,"value":3534},"true\n",{"type":36,"tag":338,"props":3536,"children":3537},{"class":340,"line":2151},[3538],{"type":36,"tag":338,"props":3539,"children":3540},{"style":351},[3541],{"type":41,"value":3283},{"type":36,"tag":338,"props":3543,"children":3544},{"class":340,"line":2233},[3545],{"type":36,"tag":338,"props":3546,"children":3547},{"style":351},[3548],{"type":41,"value":3101},{"type":36,"tag":338,"props":3550,"children":3552},{"class":340,"line":3551},27,[3553,3557,3561,3565,3569,3573],{"type":36,"tag":338,"props":3554,"children":3555},{"style":357},[3556],{"type":41,"value":3109},{"type":36,"tag":338,"props":3558,"children":3559},{"style":351},[3560],{"type":41,"value":430},{"type":36,"tag":338,"props":3562,"children":3563},{"style":372},[3564],{"type":41,"value":3306},{"type":36,"tag":338,"props":3566,"children":3567},{"style":575},[3568],{"type":41,"value":3311},{"type":36,"tag":338,"props":3570,"children":3571},{"style":372},[3572],{"type":41,"value":3316},{"type":36,"tag":338,"props":3574,"children":3575},{"style":351},[3576],{"type":41,"value":2378},{"type":36,"tag":338,"props":3578,"children":3580},{"class":340,"line":3579},28,[3581,3585,3589,3593,3597,3601],{"type":36,"tag":338,"props":3582,"children":3583},{"style":357},[3584],{"type":41,"value":3207},{"type":36,"tag":338,"props":3586,"children":3587},{"style":351},[3588],{"type":41,"value":455},{"type":36,"tag":338,"props":3590,"children":3591},{"style":357},[3592],{"type":41,"value":3504},{"type":36,"tag":338,"props":3594,"children":3595},{"style":351},[3596],{"type":41,"value":430},{"type":36,"tag":338,"props":3598,"children":3599},{"style":372},[3600],{"type":41,"value":3513},{"type":36,"tag":338,"props":3602,"children":3603},{"style":351},[3604],{"type":41,"value":493},{"type":36,"tag":338,"props":3606,"children":3608},{"class":340,"line":3607},29,[3609,3613,3617],{"type":36,"tag":338,"props":3610,"children":3611},{"style":357},[3612],{"type":41,"value":3525},{"type":36,"tag":338,"props":3614,"children":3615},{"style":351},[3616],{"type":41,"value":430},{"type":36,"tag":338,"props":3618,"children":3619},{"style":517},[3620],{"type":41,"value":3534},{"type":36,"tag":338,"props":3622,"children":3624},{"class":340,"line":3623},30,[3625],{"type":36,"tag":338,"props":3626,"children":3627},{"style":351},[3628],{"type":41,"value":3629},"    }\n",{"type":36,"tag":338,"props":3631,"children":3633},{"class":340,"line":3632},31,[3634],{"type":36,"tag":338,"props":3635,"children":3636},{"style":351},[3637],{"type":41,"value":3638},"  ]\n",{"type":36,"tag":338,"props":3640,"children":3642},{"class":340,"line":3641},32,[3643],{"type":36,"tag":338,"props":3644,"children":3645},{"style":351},[3646],{"type":41,"value":1414},{"type":36,"tag":37,"props":3648,"children":3649},{},[3650],{"type":41,"value":3651},"A few things to unpack here.",{"type":36,"tag":37,"props":3653,"children":3654},{},[3655,3660,3662,3668,3670,3676,3678,3684,3686,3692],{"type":36,"tag":106,"props":3656,"children":3657},{},[3658],{"type":41,"value":3659},"Prefix match, not exact match.",{"type":41,"value":3661}," The ",{"type":36,"tag":31,"props":3663,"children":3665},{"className":3664},[],[3666],{"type":41,"value":3667},"\"pre\": \"text/markdown\"",{"type":41,"value":3669}," operator matches any Accept header whose value starts with ",{"type":36,"tag":31,"props":3671,"children":3673},{"className":3672},[],[3674],{"type":41,"value":3675},"text/markdown",{"type":41,"value":3677},", which works because agents that specifically want markdown list it first (e.g. ",{"type":36,"tag":31,"props":3679,"children":3681},{"className":3680},[],[3682],{"type":41,"value":3683},"Accept: text/markdown, */*;q=0.1",{"type":41,"value":3685},"). An agent that lists another type first (e.g. ",{"type":36,"tag":31,"props":3687,"children":3689},{"className":3688},[],[3690],{"type":41,"value":3691},"text/html, text/markdown",{"type":41,"value":3693},") would not match - but in practice, agents requesting markdown put it at the highest priority.",{"type":36,"tag":37,"props":3695,"children":3696},{},[3697,3702,3704,3710,3712,3718,3720,3726],{"type":36,"tag":106,"props":3698,"children":3699},{},[3700],{"type":41,"value":3701},"The regex.",{"type":41,"value":3703}," ",{"type":36,"tag":31,"props":3705,"children":3707},{"className":3706},[],[3708],{"type":41,"value":3709},"(?\u003Cpath>(?!.*\\.[^/]+$).+?)/?",{"type":41,"value":3711}," captures the URL path while excluding requests for static files (anything with a file extension). Without this, requests for ",{"type":36,"tag":31,"props":3713,"children":3715},{"className":3714},[],[3716],{"type":41,"value":3717},"/image.png",{"type":41,"value":3719}," would try to serve ",{"type":36,"tag":31,"props":3721,"children":3723},{"className":3722},[],[3724],{"type":41,"value":3725},"/image/content.md",{"type":41,"value":243},{"type":36,"tag":37,"props":3728,"children":3729},{},[3730,3740,3742,3748,3750,3756],{"type":36,"tag":106,"props":3731,"children":3732},{},[3733,3738],{"type":36,"tag":31,"props":3734,"children":3736},{"className":3735},[],[3737],{"type":41,"value":273},{"type":41,"value":3739}," on HTML responses too.",{"type":41,"value":3741}," The last two rules with ",{"type":36,"tag":31,"props":3743,"children":3745},{"className":3744},[],[3746],{"type":41,"value":3747},"\"continue\": true",{"type":41,"value":3749}," add the ",{"type":36,"tag":31,"props":3751,"children":3753},{"className":3752},[],[3754],{"type":41,"value":3755},"Vary",{"type":41,"value":3757}," header to regular HTML responses. Without this, a CDN that caches the HTML version might serve it to an agent requesting markdown.",{"type":36,"tag":37,"props":3759,"children":3760},{},[3761,3766],{"type":36,"tag":106,"props":3762,"children":3763},{},[3764],{"type":41,"value":3765},"Route order matters.",{"type":41,"value":3767}," Markdown rules come first, because if you put HTML fallback rules above them the Accept header check never runs.",{"type":36,"tag":163,"props":3769,"children":3770},{},[],{"type":36,"tag":167,"props":3772,"children":3774},{"id":3773},"why-not-just-use-middleware",[3775],{"type":41,"value":3776},"Why not just use middleware?",{"type":36,"tag":37,"props":3778,"children":3779},{},[3780],{"type":41,"value":3781},"I evaluated four approaches:",{"type":36,"tag":3783,"props":3784,"children":3785},"table",{},[3786,3805],{"type":36,"tag":3787,"props":3788,"children":3789},"thead",{},[3790],{"type":36,"tag":3791,"props":3792,"children":3793},"tr",{},[3794,3800],{"type":36,"tag":3795,"props":3796,"children":3797},"th",{},[3798],{"type":41,"value":3799},"Approach",{"type":36,"tag":3795,"props":3801,"children":3802},{},[3803],{"type":41,"value":3804},"Trade-off",{"type":36,"tag":3806,"props":3807,"children":3808},"tbody",{},[3809,3825,3848,3893],{"type":36,"tag":3791,"props":3810,"children":3811},{},[3812,3820],{"type":36,"tag":2429,"props":3813,"children":3814},{},[3815],{"type":36,"tag":106,"props":3816,"children":3817},{},[3818],{"type":41,"value":3819},"Cloudflare Pro",{"type":36,"tag":2429,"props":3821,"children":3822},{},[3823],{"type":41,"value":3824},"Automatic, but requires Cloudflare proxy and Pro plan. Vendor lock-in.",{"type":36,"tag":3791,"props":3826,"children":3827},{},[3828,3836],{"type":36,"tag":2429,"props":3829,"children":3830},{},[3831],{"type":36,"tag":106,"props":3832,"children":3833},{},[3834],{"type":41,"value":3835},"Vercel middleware",{"type":36,"tag":2429,"props":3837,"children":3838},{},[3839,3841,3846],{"type":41,"value":3840},"Full control with fallback logic (check if ",{"type":36,"tag":31,"props":3842,"children":3844},{"className":3843},[],[3845],{"type":41,"value":133},{"type":41,"value":3847}," exists). Adds runtime compute cost on every request. Not economical at scale.",{"type":36,"tag":3791,"props":3849,"children":3850},{},[3851,3859],{"type":36,"tag":2429,"props":3852,"children":3853},{},[3854],{"type":36,"tag":106,"props":3855,"children":3856},{},[3857],{"type":41,"value":3858},"Rewrites + renamed files",{"type":36,"tag":2429,"props":3860,"children":3861},{},[3862,3864,3870,3872,3877,3879,3884,3886,3891],{"type":41,"value":3863},"Modern config (",{"type":36,"tag":31,"props":3865,"children":3867},{"className":3866},[],[3868],{"type":41,"value":3869},"page.html",{"type":41,"value":3871}," + ",{"type":36,"tag":31,"props":3873,"children":3875},{"className":3874},[],[3876],{"type":41,"value":133},{"type":41,"value":3878}," instead of ",{"type":36,"tag":31,"props":3880,"children":3882},{"className":3881},[],[3883],{"type":41,"value":141},{"type":41,"value":3885},"). Works, but breaks tooling that assumes ",{"type":36,"tag":31,"props":3887,"children":3889},{"className":3888},[],[3890],{"type":41,"value":141},{"type":41,"value":3892}," as output - build warnings, override path errors.",{"type":36,"tag":3791,"props":3894,"children":3895},{},[3896,3906],{"type":36,"tag":2429,"props":3897,"children":3898},{},[3899,3904],{"type":36,"tag":106,"props":3900,"children":3901},{},[3902],{"type":41,"value":3903},"Routes",{"type":41,"value":3905}," (chosen)",{"type":36,"tag":2429,"props":3907,"children":3908},{},[3909,3911,3916,3918,3924,3926,3932,3933,3939,3941,3946],{"type":41,"value":3910},"Deterministic header-based routing. No runtime cost. Keeps standard ",{"type":36,"tag":31,"props":3912,"children":3914},{"className":3913},[],[3915],{"type":41,"value":141},{"type":41,"value":3917}," output. One-time migration from ",{"type":36,"tag":31,"props":3919,"children":3921},{"className":3920},[],[3922],{"type":41,"value":3923},"rewrites",{"type":41,"value":3925},"/",{"type":36,"tag":31,"props":3927,"children":3929},{"className":3928},[],[3930],{"type":41,"value":3931},"headers",{"type":41,"value":3925},{"type":36,"tag":31,"props":3934,"children":3936},{"className":3935},[],[3937],{"type":41,"value":3938},"redirects",{"type":41,"value":3940}," to a single ",{"type":36,"tag":31,"props":3942,"children":3944},{"className":3943},[],[3945],{"type":41,"value":254},{"type":41,"value":3947}," array.",{"type":36,"tag":37,"props":3949,"children":3950},{},[3951],{"type":41,"value":3952},"For a high-traffic prerendered site, routes won on both cost and reliability, and the rest of this section walks through why I rejected the other three.",{"type":36,"tag":1046,"props":3954,"children":3956},{"id":3955},"what-i-tried-before-settling-on-routes",[3957,3959],{"type":41,"value":3958},"What I tried before settling on ",{"type":36,"tag":31,"props":3960,"children":3962},{"className":3961},[],[3963],{"type":41,"value":254},{"type":36,"tag":37,"props":3965,"children":3966},{},[3967,3969,3974,3976,3981,3983,3988],{"type":41,"value":3968},"I started with ",{"type":36,"tag":106,"props":3970,"children":3971},{},[3972],{"type":41,"value":3973},"Vercel rewrites",{"type":41,"value":3975}," in ",{"type":36,"tag":31,"props":3977,"children":3979},{"className":3978},[],[3980],{"type":41,"value":3063},{"type":41,"value":3982}," because they are the modern, straightforward option. In practice, when both ",{"type":36,"tag":31,"props":3984,"children":3986},{"className":3985},[],[3987],{"type":41,"value":141},{"type":41,"value":3989}," and markdown lived in the same route folder under predictable names, Vercel’s filesystem resolution sometimes won over rewrites in ways that were hard to reason about, especially across nested prerendered routes.",{"type":36,"tag":37,"props":3991,"children":3992},{},[3993,3998],{"type":36,"tag":106,"props":3994,"children":3995},{},[3996],{"type":41,"value":3997},"Middleware",{"type":41,"value":3999}," came next. It gave the cleanest control flow and made it trivial to fall back to HTML when markdown was missing. It solved the routing logic well, but it runs on every request. For high traffic, that is a long-term cost surface I wanted to avoid.",{"type":36,"tag":37,"props":4001,"children":4002},{},[4003,4005,4009,4011,4016,4017,4022,4024,4029,4030,4035,4036,4041],{"type":41,"value":4004},"To drop middleware, I went back to ",{"type":36,"tag":106,"props":4006,"children":4007},{},[4008],{"type":41,"value":3923},{"type":41,"value":4010}," with ",{"type":36,"tag":106,"props":4012,"children":4013},{},[4014],{"type":41,"value":4015},"renamed build output",{"type":41,"value":430},{"type":36,"tag":31,"props":4018,"children":4020},{"className":4019},[],[4021],{"type":41,"value":3869},{"type":41,"value":4023}," plus ",{"type":36,"tag":31,"props":4025,"children":4027},{"className":4026},[],[4028],{"type":41,"value":133},{"type":41,"value":3878},{"type":36,"tag":31,"props":4031,"children":4033},{"className":4032},[],[4034],{"type":41,"value":141},{"type":41,"value":4023},{"type":36,"tag":31,"props":4037,"children":4039},{"className":4038},[],[4040],{"type":41,"value":133},{"type":41,"value":4042},". Rewrites then behaved consistently across many URLs, including deep paths. The trade-off showed up in build logs: warnings on many routes, along the lines of:",{"type":36,"tag":328,"props":4044,"children":4047},{"className":4045,"code":4046,"language":41,"meta":7,"style":7},"language-text shiki shiki-themes one-dark-pro","Warning: Override path \"services/example-service/index.html\" was not detected as an output path\n",[4048],{"type":36,"tag":31,"props":4049,"children":4050},{"__ignoreMap":7},[4051],{"type":36,"tag":338,"props":4052,"children":4053},{"class":340,"line":341},[4054],{"type":36,"tag":338,"props":4055,"children":4056},{},[4057],{"type":41,"value":4046},{"type":36,"tag":37,"props":4059,"children":4060},{},[4061,4063,4068],{"type":41,"value":4062},"That is a red flag. Renaming away from ",{"type":36,"tag":31,"props":4064,"children":4066},{"className":4065},[],[4067],{"type":41,"value":141},{"type":41,"value":4069}," fights Nuxt/Nitro’s expected output contract and can cascade into subtle breakage.",{"type":36,"tag":37,"props":4071,"children":4072},{},[4073,4081,4083,4088,4090,4095],{"type":36,"tag":106,"props":4074,"children":4075},{},[4076],{"type":36,"tag":31,"props":4077,"children":4079},{"className":4078},[],[4080],{"type":41,"value":254},{"type":41,"value":4082}," was the compromise that felt safest: a one-time migration of ",{"type":36,"tag":31,"props":4084,"children":4086},{"className":4085},[],[4087],{"type":41,"value":3063},{"type":41,"value":4089}," (and any code that generates redirects or routing config), but conventional ",{"type":36,"tag":31,"props":4091,"children":4093},{"className":4092},[],[4094],{"type":41,"value":141},{"type":41,"value":4096}," output, header-based routing, and no ongoing middleware compute.",{"type":36,"tag":1046,"props":4098,"children":4100},{"id":4099},"routes-is-labeled-legacy-in-vercel-docs",[4101,4106],{"type":36,"tag":31,"props":4102,"children":4104},{"className":4103},[],[4105],{"type":41,"value":254},{"type":41,"value":4107}," is labeled “legacy” in Vercel docs",{"type":36,"tag":37,"props":4109,"children":4110},{},[4111,4113,4118,4120,4146,4148,4153,4155,4160],{"type":41,"value":4112},"Vercel’s docs describe ",{"type":36,"tag":31,"props":4114,"children":4116},{"className":4115},[],[4117],{"type":41,"value":254},{"type":41,"value":4119}," as a ",{"type":36,"tag":49,"props":4121,"children":4124},{"href":4122,"rel":4123},"https://vercel.com/docs/project-configuration/vercel-json#upgrading-legacy-routes",[53],[4125,4127,4132,4133,4138,4139,4144],{"type":41,"value":4126},"legacy mechanism and recommend newer ",{"type":36,"tag":31,"props":4128,"children":4130},{"className":4129},[],[4131],{"type":41,"value":3923},{"type":41,"value":474},{"type":36,"tag":31,"props":4134,"children":4136},{"className":4135},[],[4137],{"type":41,"value":3938},{"type":41,"value":474},{"type":36,"tag":31,"props":4140,"children":4142},{"className":4141},[],[4143],{"type":41,"value":3931},{"type":41,"value":4145},", and related properties",{"type":41,"value":4147}," for most upgrades. The same documentation also says that ",{"type":36,"tag":31,"props":4149,"children":4151},{"className":4150},[],[4152],{"type":41,"value":254},{"type":41,"value":4154}," exists for ",{"type":36,"tag":106,"props":4156,"children":4157},{},[4158],{"type":41,"value":4159},"advanced integration",{"type":41,"value":4161}," scenarios. Taken together, that reads less like “scheduled for removal” and more like “power user surface” - reasonable to depend on for header-based file routing until a newer config primitive matches this behavior cleanly.",{"type":36,"tag":163,"props":4163,"children":4164},{},[],{"type":36,"tag":167,"props":4166,"children":4168},{"id":4167},"not-on-nuxt-or-vercel",[4169],{"type":41,"value":4170},"Not on Nuxt or Vercel?",{"type":36,"tag":37,"props":4172,"children":4173},{},[4174],{"type":41,"value":4175},"The pattern is not framework-specific. Any static site generator that outputs HTML files works. Replace the Nuxt module with a post-build script that walks the output directory.",{"type":36,"tag":37,"props":4177,"children":4178},{},[4179],{"type":41,"value":4180},"For hosting, you need header-based routing:",{"type":36,"tag":4182,"props":4183,"children":4184},"ul",{},[4185,4211,4235],{"type":36,"tag":178,"props":4186,"children":4187},{},[4188,4193,4195,4201,4203,4209],{"type":36,"tag":106,"props":4189,"children":4190},{},[4191],{"type":41,"value":4192},"Nginx",{"type":41,"value":4194},": Use ",{"type":36,"tag":31,"props":4196,"children":4198},{"className":4197},[],[4199],{"type":41,"value":4200},"map $http_accept $content_suffix",{"type":41,"value":4202}," to select the file, then ",{"type":36,"tag":31,"props":4204,"children":4206},{"className":4205},[],[4207],{"type":41,"value":4208},"try_files",{"type":41,"value":4210}," to serve it.",{"type":36,"tag":178,"props":4212,"children":4213},{},[4214,4219,4220,4226,4227,4233],{"type":36,"tag":106,"props":4215,"children":4216},{},[4217],{"type":41,"value":4218},"Apache",{"type":41,"value":430},{"type":36,"tag":31,"props":4221,"children":4223},{"className":4222},[],[4224],{"type":41,"value":4225},"mod_rewrite",{"type":41,"value":4010},{"type":36,"tag":31,"props":4228,"children":4230},{"className":4229},[],[4231],{"type":41,"value":4232},"%{HTTP:Accept}",{"type":41,"value":4234}," condition.",{"type":36,"tag":178,"props":4236,"children":4237},{},[4238,4243,4245,4250,4252,4258],{"type":36,"tag":106,"props":4239,"children":4240},{},[4241],{"type":41,"value":4242},"Netlify",{"type":41,"value":4244},": Edge functions to inspect the ",{"type":36,"tag":31,"props":4246,"children":4248},{"className":4247},[],[4249],{"type":41,"value":262},{"type":41,"value":4251}," header and rewrite the response. Netlify's ",{"type":36,"tag":31,"props":4253,"children":4255},{"className":4254},[],[4256],{"type":41,"value":4257},"_headers",{"type":41,"value":4259}," file and redirect rules do not support conditions on arbitrary request headers.",{"type":36,"tag":37,"props":4261,"children":4262},{},[4263,4265,4270],{"type":41,"value":4264},"If your site already stores content as markdown (Nuxt Content, Astro, Jekyll, Hugo), you have an even simpler path. You can skip the conversion entirely and serve the raw markdown files through a route that responds to the ",{"type":36,"tag":31,"props":4266,"children":4268},{"className":4267},[],[4269],{"type":41,"value":102},{"type":41,"value":264},{"type":36,"tag":163,"props":4272,"children":4273},{},[],{"type":36,"tag":167,"props":4275,"children":4277},{"id":4276},"is-it-worth-shipping",[4278],{"type":41,"value":4279},"Is it worth shipping?",{"type":36,"tag":37,"props":4281,"children":4282},{},[4283],{"type":41,"value":4284},"For any prerendered or static site, this is an afternoon of work. A build-time conversion step, a few routing rules, and the right cache headers are enough to deliver markdown without runtime cost, vendor dependency, or a paid plan.",{"type":36,"tag":37,"props":4286,"children":4287},{},[4288,4290,4297],{"type":41,"value":4289},"If you want help implementing Markdown for Agents or optimizing your site for AI visibility more broadly, I offer this as part of my ",{"type":36,"tag":49,"props":4291,"children":4294},{"href":4292,"rel":4293},"https://coditive.ai/services/ai-enhancements/",[53],[4295],{"type":41,"value":4296},"AI Web Enhancements service",{"type":41,"value":4298}," at coditive.ai.",{"type":36,"tag":4300,"props":4301,"children":4302},"style",{},[4303],{"type":41,"value":4304},"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);}",{"title":7,"searchDepth":383,"depth":383,"links":4306},[4307,4308,4314,4315,4321,4322],{"id":169,"depth":383,"text":172},{"id":281,"depth":383,"text":284,"children":4309},[4310,4311,4312,4313],{"id":1048,"depth":393,"text":1051},{"id":2241,"depth":393,"text":2244},{"id":2485,"depth":393,"text":2488},{"id":2988,"depth":393,"text":2991},{"id":3042,"depth":383,"text":3045},{"id":3773,"depth":383,"text":3776,"children":4316},[4317,4319],{"id":3955,"depth":393,"text":4318},"What I tried before settling on routes",{"id":4099,"depth":393,"text":4320},"routes is labeled “legacy” in Vercel docs",{"id":4167,"depth":383,"text":4170},{"id":4276,"depth":383,"text":4279},"markdown","content:ai:markdown-for-agents-without-cloudflare.md","content","ai/markdown-for-agents-without-cloudflare.md","ai/markdown-for-agents-without-cloudflare","md",1776168272211]