[{"data":1,"prerenderedAt":1269,"buildId":1270},["ShallowReactive",2],{"docs:\u002Fguide\u002Finstallation":3},{"page":4,"section":16,"document":17,"credits":10,"prev":1263,"next":1267},{"id":5,"path":6,"file":7,"title":8,"sourceTitle":8,"description":9,"tagline":9,"eyebrow":10,"credits":10,"keywords":11,"icon":12,"layout":13,"sidebar":14,"toc":14,"kind":10,"group":10,"navigation":14,"order":15},"installation","\u002Fguide\u002Finstallation","guide\u002Finstallation.md","Installation","Install whoasks, put it in front of an h3, Nitro, Hono or Cloudflare Workers app, and check with curl that Markdown comes back.",null,[],"i-lucide-download","article",true,2,"guide",{"nodes":18,"toc":1247},[19,125,129,151,178,186,204,209,394,408,423,434,440,491,494,500,625,628,634,753,766,780,786,792,949,958,964,1020,1026,1033,1160,1166,1215,1226,1231],[20,21,47,77,94,110],"tabs",{"uid":22,"count":23,"labels":24,"sync":29,"code":30,"magic":31,"icons":32},"ct-1bg63v8-1","4",[25,26,27,28],"pnpm","npm","yarn","bun","pm","true","auto",[33,38,41,44],{"name":34,"src":35,"ratio":36,"mask":37},"pm:pnpm","data:image\u002Fsvg+xml,%3Csvg xmlns='http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg' viewBox='0 0 32 32'%3E%3Cpath fill='%23f9ad00' d='M30 10.75h-8.749V2H30Zm-9.626 0h-8.75V2h8.75Zm-9.625 0H2V2h8.749ZM30 20.375h-8.749v-8.75H30Z'%2F%3E%3Cpath fill='%238a8a8a' d='M20.374 20.375h-8.75v-8.75h8.75Zm0 9.625h-8.75v-8.75h8.75ZM30 30h-8.749v-8.75H30Zm-19.251 0H2v-8.75h8.749Z'%2F%3E%3C%2Fsvg%3E",1,false,{"name":39,"src":40,"ratio":36,"mask":37},"pm:npm","data:image\u002Fsvg+xml,%3Csvg xmlns='http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg' viewBox='0 0 32 32'%3E%3Cpath fill='%23c12127' d='M2 2h28v28H2'%2F%3E%3Cpath fill='%238a8a8a' d='M7.25 7.25h17.5v17.5h-3.5v-14H16v14H7.25'%2F%3E%3C%2Fsvg%3E",{"name":42,"src":43,"ratio":36,"mask":37},"pm:yarn","data:image\u002Fsvg+xml,%3Csvg xmlns='http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg' viewBox='0 0 32 32'%3E%3Cpath fill='%232188b6' d='M28.208 24.409a10.5 10.5 0 0 0-3.959 1.822a23.7 23.7 0 0 1-5.835 2.642a1.63 1.63 0 0 1-.983.55a62 62 0 0 1-6.447.577c-1.163.009-1.876-.3-2.074-.776a1.573 1.573 0 0 1 .866-2.074a4 4 0 0 1-.514-.379c-.171-.171-.352-.514-.406-.388c-.225.55-.343 1.894-.947 2.5c-.83.839-2.4.559-3.328.072c-1.019-.541.072-1.813.072-1.813a.73.73 0 0 1-.992-.343a4.85 4.85 0 0 1-.667-2.949a5.37 5.37 0 0 1 1.749-2.895a9.3 9.3 0 0 1 .658-4.4a10.45 10.45 0 0 1 3.165-3.661S6.628 10.747 7.35 8.817c.469-1.262.658-1.253.812-1.308a3.6 3.6 0 0 0 1.452-.857a5.27 5.27 0 0 1 4.41-1.7S15.2 1.4 16.277 2.09a18.4 18.4 0 0 1 1.533 2.886s1.281-.748 1.425-.469a11.33 11.33 0 0 1 .523 6.132a14 14 0 0 1-2.6 5.411c-.135.225 1.551.938 2.615 3.887c.983 2.7.108 4.96.262 5.212c.027.045.036.063.036.063s1.127.09 3.391-1.308a8.5 8.5 0 0 1 4.277-1.604a1.081 1.081 0 0 1 .469 2.11Z'%2F%3E%3C%2Fsvg%3E",{"name":45,"src":46,"ratio":36,"mask":37},"pm:bun","data:image\u002Fsvg+xml,%3Csvg xmlns='http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg' viewBox='0 0 32 32'%3E%3Cpath fill='%23fbf0df' d='M29 17c0 5.65-5.82 10.23-13 10.23S3 22.61 3 17c0-3.5 2.24-6.6 5.66-8.44S14.21 4.81 16 4.81s3.32 1.54 7.34 3.71C26.76 10.36 29 13.46 29 17'%2F%3E%3Cpath fill='none' stroke='%23000' d='M16 27.65c7.32 0 13.46-4.65 13.46-10.65c0-3.72-2.37-7-5.89-8.85c-1.39-.75-2.46-1.41-3.37-2l-1.13-.69A6.14 6.14 0 0 0 16 4.35a6.9 6.9 0 0 0-3.3 1.23c-.42.24-.86.51-1.32.8c-.87.54-1.83 1.13-3 1.73C4.91 10 2.54 13.24 2.54 17c0 6 6.14 10.65 13.46 10.65Z'%2F%3E%3Cellipse cx='21.65' cy='18.62' fill='%23febbd0' rx='2.17' ry='1.28'%2F%3E%3Cellipse cx='10.41' cy='18.62' fill='%23febbd0' rx='2.17' ry='1.28'%2F%3E%3Cpath fill-rule='evenodd' d='M11.43 18.11a2 2 0 1 0-2-2.05a2.05 2.05 0 0 0 2 2.05m9.2 0a2 2 0 1 0-2-2.05a2 2 0 0 0 2 2.05'%2F%3E%3Cpath fill='%238a8a8a' fill-rule='evenodd' d='M10.79 16.19a.77.77 0 1 0-.76-.77a.76.76 0 0 0 .76.77m9.2 0a.77.77 0 1 0 0-1.53a.77.77 0 0 0 0 1.53'%2F%3E%3Cpath fill='%23b71422' stroke='%23000' stroke-width='.75' d='M18.62 19.67a3.3 3.3 0 0 1-1.09 1.75a2.48 2.48 0 0 1-1.5.69a2.53 2.53 0 0 1-1.5-.69a3.28 3.28 0 0 1-1.08-1.75a.26.26 0 0 1 .29-.3h4.58a.27.27 0 0 1 .3.3Z'%2F%3E%3Cpath fill='%23ccbea7' fill-rule='evenodd' d='M14.93 5.75a6.1 6.1 0 0 1-2.09 4.62c-.1.09 0 .27.11.22c1.25-.49 2.94-1.94 2.23-4.88c-.03-.15-.25-.11-.25.04m.85 0a6 6 0 0 1 .57 5c0 .13.12.24.21.13c.83-1 1.54-3.11-.59-5.31c-.1-.11-.27.04-.19.17Zm1-.06a6.1 6.1 0 0 1 2.53 4.38c0 .14.21.17.24 0c.34-1.3.15-3.51-2.66-4.66c-.12-.02-.21.18-.09.27ZM9.94 9.55a6.27 6.27 0 0 0 3.89-3.33c.07-.13.28-.08.25.07c-.64 3-2.79 3.59-4.13 3.51c-.14-.01-.14-.21-.01-.25'%2F%3E%3C%2Fsvg%3E",[48,49,52],"tabs-item",{"label":25,"index":50,"icon":51},"1",{"name":34,"src":35,"ratio":36,"mask":37},[53,54,58],"pre",{"language":55,"frame":56,"class":57,"wrap":14},"sh","terminal","shiki shiki-themes github-light-default github-dark-default dark:github-dark-default",[59,60,62],"code",{"class":61},"language-sh",[63,64,67,70,74],"span",{"class":65,"style":66},"line","display: inline",[63,68,25],{"style":69},"color:#953800;--shiki-dark:#FFA657",[63,71,73],{"style":72},"color:#0A3069;--shiki-dark:#A5D6FF"," add",[63,75,76],{"style":72}," whoasks",[48,78,81],{"label":26,"index":79,"icon":80},"2",{"name":39,"src":40,"ratio":36,"mask":37},[53,82,83],{"language":55,"frame":56,"class":57,"wrap":14},[59,84,85],{"class":61},[63,86,87,89,92],{"class":65,"style":66},[63,88,26],{"style":69},[63,90,91],{"style":72}," install",[63,93,76],{"style":72},[48,95,98],{"label":27,"index":96,"icon":97},"3",{"name":42,"src":43,"ratio":36,"mask":37},[53,99,100],{"language":55,"frame":56,"class":57,"wrap":14},[59,101,102],{"class":61},[63,103,104,106,108],{"class":65,"style":66},[63,105,27],{"style":69},[63,107,73],{"style":72},[63,109,76],{"style":72},[48,111,113],{"label":28,"index":23,"icon":112},{"name":45,"src":46,"ratio":36,"mask":37},[53,114,115],{"language":55,"frame":56,"class":57,"wrap":14},[59,116,117],{"class":61},[63,118,119,121,123],{"class":65,"style":66},[63,120,28],{"style":69},[63,122,73],{"style":72},[63,124,76],{"style":72},[126,127,128],"p",{},"Requirements and package details:",[130,131,132,136,139,145],"ul",{},[133,134,135],"li",{},"Node 22.12 or later.",[133,137,138],{},"ESM only.",[133,140,141,144],{},[59,142,143],{},"mdream"," is the only runtime dependency.",[133,146,147,150],{},[59,148,149],{},"whoasks\u002Fh3"," needs h3 2.0.8 or later. h3 is an optional peer dependency, so install it only if you use that entry.",[152,153,156],"github-callout",{"type":154,"title":155},"note","Ask your coding agent to add it",[53,157,159],{"language":158,"class":57,"wrap":14},"text",[59,160,162,167,168,167,173],{"class":161},"language-text",[63,163,164],{"class":65,"style":66},[63,165,166],{},"Add whoasks to this app, following https:\u002F\u002Fwhoasks.loadsheet.dev\u002Fguide\u002Finstallation.","\n",[63,169,170],{"class":65,"style":66},[63,171,172],{},"Put site.handle in front of the app so its HTML pages also answer as Markdown, and call site.respond in routes that return data.",[63,174,175],{"class":65,"style":66},[63,176,177],{},"Then run curl three times against one page: with -H 'Accept: text\u002Fmarkdown', with the .md twin URL, and with no header. Check the Content-Type and Vary of each.",[179,180,185],"h2",{"id":181,"anchor":182},"put-it-in-front-of-your-app",{"label":183,"icon":184},"Section titled \"Put it in front of your app\"","#","Put it in front of your app",[126,187,188,191,192,195,196,199,200,203],{},[59,189,190],{},"site.handle(request, next)"," has the shape of ",[59,193,194],{},"fetch",". It takes a Web ",[59,197,198],{},"Request"," and a function that returns the app's ",[59,201,202],{},"Response",", so every runtime below is the same call.",[205,206,205],"h3",{"id":205,"anchor":207},{"label":208,"icon":184},"Section titled \"h3\"",[53,210,213],{"language":211,"filename":212,"class":57,"wrap":14},"ts","app.ts",[59,214,216,167,235,167,249,167,263,167,265,167,283,167,285,167,324,167,326,167,336,167,344,167,351,167,359,167,367,167,372,167,377,167,384,167,389],{"class":215},"language-ts",[63,217,218,222,226,229,232],{"class":65,"style":66},[63,219,221],{"style":220},"color:#CF222E;--shiki-dark:#FF7B72","import",[63,223,225],{"style":224},"color:#1F2328;--shiki-dark:#E6EDF3"," { H3, defineHandler, html } ",[63,227,228],{"style":220},"from",[63,230,231],{"style":72}," \"h3\"",[63,233,234],{"style":224},";",[63,236,237,239,242,244,247],{"class":65,"style":66},[63,238,221],{"style":220},[63,240,241],{"style":224}," { whoasks } ",[63,243,228],{"style":220},[63,245,246],{"style":72}," \"whoasks\"",[63,248,234],{"style":224},[63,250,251,253,256,258,261],{"class":65,"style":66},[63,252,221],{"style":220},[63,254,255],{"style":224}," { middleware } ",[63,257,228],{"style":220},[63,259,260],{"style":72}," \"whoasks\u002Fh3\"",[63,262,234],{"style":224},[63,264],{"class":65,"style":66},[63,266,267,270,274,277,280],{"class":65,"style":66},[63,268,269],{"style":220},"const",[63,271,273],{"style":272},"color:#0550AE;--shiki-dark:#79C0FF"," site",[63,275,276],{"style":220}," =",[63,278,76],{"style":279},"color:#8250DF;--shiki-dark:#D2A8FF",[63,281,282],{"style":224},"();",[63,284],{"class":65,"style":66},[63,286,287,290,293,296,299,302,304,307,309,312,315,318,321],{"class":65,"style":66},[63,288,289],{"style":220},"export",[63,291,292],{"style":220}," const",[63,294,295],{"style":272}," app",[63,297,298],{"style":220},":",[63,300,301],{"style":69}," H3",[63,303,276],{"style":220},[63,305,306],{"style":220}," new",[63,308,301],{"style":279},[63,310,311],{"style":224},"().",[63,313,314],{"style":279},"use",[63,316,317],{"style":224},"(",[63,319,320],{"style":279},"middleware",[63,322,323],{"style":224},"(site));",[63,325],{"class":65,"style":66},[63,327,328,331,334],{"class":65,"style":66},[63,329,330],{"style":224},"app.",[63,332,333],{"style":279},"get",[63,335,317],{"style":224},[63,337,338,341],{"class":65,"style":66},[63,339,340],{"style":72},"  \"\u002Fdocs\u002Fguide\"",[63,342,343],{"style":224},",",[63,345,346,349],{"class":65,"style":66},[63,347,348],{"style":279},"  defineHandler",[63,350,317],{"style":224},[63,352,353,356],{"class":65,"style":66},[63,354,355],{"style":224},"    () ",[63,357,358],{"style":220},"=>",[63,360,361,364],{"class":65,"style":66},[63,362,363],{"style":279},"      html",[63,365,366],{"style":72},"`\u003Cmain>",[63,368,369],{"class":65,"style":66},[63,370,371],{"style":72},"        \u003Ch1>Guide\u003C\u002Fh1>",[63,373,374],{"class":65,"style":66},[63,375,376],{"style":72},"        \u003Cp>Hello\u003C\u002Fp>",[63,378,379,382],{"class":65,"style":66},[63,380,381],{"style":72},"      \u003C\u002Fmain>`",[63,383,343],{"style":224},[63,385,386],{"class":65,"style":66},[63,387,388],{"style":224},"  ),",[63,390,391],{"class":65,"style":66},[63,392,393],{"style":224},");",[126,395,396,399,400,403,404,407],{},[59,397,398],{},"middleware(site)"," passes ",[59,401,402],{},"event.req"," to ",[59,405,406],{},"handle",".",[126,409,410,411,414,415,418,419,422],{},"For a twin URL or ",[59,412,413],{},"?format="," request, it sends the canonical URL through the app again from the top. Your ",[59,416,417],{},"\u002Fdocs\u002Fguide"," route answers ",[59,420,421],{},"\u002Fdocs\u002Fguide.md"," with no extra route.",[126,424,425,426,429,430,433],{},"A real ",[59,427,428],{},".md"," route in the app, such as ",[59,431,432],{},"\u002Fnotes.md",", is still served as the app sends it.",[205,435,439],{"id":436,"anchor":437},"nitro",{"label":438,"icon":184},"Section titled \"Nitro\"","Nitro",[53,441,443],{"language":211,"filename":442,"class":57,"wrap":14},"server\u002Fmiddleware\u002Fwhoasks.ts",[59,444,445,167,457,167,469,167,471],{"class":215},[63,446,447,449,451,453,455],{"class":65,"style":66},[63,448,221],{"style":220},[63,450,241],{"style":224},[63,452,228],{"style":220},[63,454,246],{"style":72},[63,456,234],{"style":224},[63,458,459,461,463,465,467],{"class":65,"style":66},[63,460,221],{"style":220},[63,462,255],{"style":224},[63,464,228],{"style":220},[63,466,260],{"style":72},[63,468,234],{"style":224},[63,470],{"class":65,"style":66},[63,472,473,475,478,481,483,486,489],{"class":65,"style":66},[63,474,289],{"style":220},[63,476,477],{"style":220}," default",[63,479,480],{"style":279}," middleware",[63,482,317],{"style":69},[63,484,485],{"style":279},"whoasks",[63,487,488],{"style":69},"())",[63,490,234],{"style":224},[126,492,493],{},"Nitro v3 runs on h3 v2, so this should work. No test runs it and we did not try it.",[205,495,499],{"id":496,"anchor":497},"hono",{"label":498,"icon":184},"Section titled \"Hono\"","Hono",[53,501,502],{"language":211,"filename":212,"class":57,"wrap":14},[59,503,504,167,518,167,530,167,532,167,544,167,565,167,579],{"class":215},[63,505,506,508,511,513,516],{"class":65,"style":66},[63,507,221],{"style":220},[63,509,510],{"style":224}," { Hono } ",[63,512,228],{"style":220},[63,514,515],{"style":72}," \"hono\"",[63,517,234],{"style":224},[63,519,520,522,524,526,528],{"class":65,"style":66},[63,521,221],{"style":220},[63,523,241],{"style":224},[63,525,228],{"style":220},[63,527,246],{"style":72},[63,529,234],{"style":224},[63,531],{"class":65,"style":66},[63,533,534,536,538,540,542],{"class":65,"style":66},[63,535,269],{"style":220},[63,537,273],{"style":272},[63,539,276],{"style":220},[63,541,76],{"style":279},[63,543,282],{"style":224},[63,545,546,548,551,553,555,558,561],{"class":65,"style":66},[63,547,269],{"style":220},[63,549,550],{"style":272}," routes",[63,552,276],{"style":220},[63,554,306],{"style":220},[63,556,557],{"style":279}," Hono",[63,559,560],{"style":224},"(); ",[63,562,564],{"style":563},"color:#6E7781;--shiki-dark:#8B949E","\u002F\u002F your routes",[63,566,567,569,571,573,575,577],{"class":65,"style":66},[63,568,269],{"style":220},[63,570,295],{"style":272},[63,572,276],{"style":220},[63,574,306],{"style":220},[63,576,557],{"style":279},[63,578,282],{"style":224},[63,580,581,583,586,588,591,594,597,600,602,605,607,610,613,615,617,620,622],{"class":65,"style":66},[63,582,330],{"style":224},[63,584,585],{"style":279},"all",[63,587,317],{"style":224},[63,589,590],{"style":72},"\"*\"",[63,592,593],{"style":224},", (",[63,595,596],{"style":69},"c",[63,598,599],{"style":224},") ",[63,601,358],{"style":220},[63,603,604],{"style":224}," site.",[63,606,406],{"style":279},[63,608,609],{"style":224},"(c.req.raw, (",[63,611,612],{"style":69},"request",[63,614,599],{"style":224},[63,616,358],{"style":220},[63,618,619],{"style":224}," routes.",[63,621,194],{"style":279},[63,623,624],{"style":224},"(request)));",[126,626,627],{},"No test runs this snippet.",[205,629,633],{"id":630,"anchor":631},"cloudflare-workers",{"label":632,"icon":184},"Section titled \"Cloudflare Workers\"","Cloudflare Workers",[53,635,637],{"language":211,"filename":636,"class":57,"wrap":14},"worker.ts",[59,638,639,167,651,167,653,167,665,167,667,167,676,167,715,167,746],{"class":215},[63,640,641,643,645,647,649],{"class":65,"style":66},[63,642,221],{"style":220},[63,644,241],{"style":224},[63,646,228],{"style":220},[63,648,246],{"style":72},[63,650,234],{"style":224},[63,652],{"class":65,"style":66},[63,654,655,657,659,661,663],{"class":65,"style":66},[63,656,269],{"style":220},[63,658,273],{"style":272},[63,660,276],{"style":220},[63,662,76],{"style":279},[63,664,282],{"style":224},[63,666],{"class":65,"style":66},[63,668,669,671,673],{"class":65,"style":66},[63,670,289],{"style":220},[63,672,477],{"style":220},[63,674,675],{"style":69}," {",[63,677,678,681,684,686,688,691,694,697,699,702,705,707,710,713],{"class":65,"style":66},[63,679,680],{"style":279},"  fetch",[63,682,683],{"style":224},": (",[63,685,612],{"style":69},[63,687,298],{"style":220},[63,689,690],{"style":69}," Request",[63,692,693],{"style":224},", ",[63,695,696],{"style":69},"env",[63,698,298],{"style":220},[63,700,701],{"style":224}," { ",[63,703,704],{"style":69},"ASSETS",[63,706,298],{"style":220},[63,708,709],{"style":69}," Fetcher",[63,711,712],{"style":224}," }) ",[63,714,358],{"style":220},[63,716,717,720,722,725,728,730,732,735,737,739,741,744],{"class":65,"style":66},[63,718,719],{"style":224},"    site.",[63,721,406],{"style":279},[63,723,724],{"style":224},"(request, (",[63,726,727],{"style":69},"r",[63,729,599],{"style":224},[63,731,358],{"style":220},[63,733,734],{"style":224}," env.",[63,736,704],{"style":272},[63,738,407],{"style":224},[63,740,194],{"style":279},[63,742,743],{"style":224},"(r))",[63,745,343],{"style":69},[63,747,748,751],{"class":65,"style":66},[63,749,750],{"style":69},"}",[63,752,234],{"style":224},[126,754,755,756,758,759,762,763,407],{},"A test bundles ",[59,757,485],{}," for ",[59,760,761],{},"workerd"," with no Node builtin, runs it in Miniflare, and gets Markdown for ",[59,764,765],{},"Accept: text\u002Fmarkdown",[126,767,768,769,771,772,775,776,779],{},"Under the ",[59,770,761],{}," and ",[59,773,774],{},"edge-light"," export conditions, mdream uses a wasm build, so the bundle carries a ",[59,777,778],{},".wasm"," file.",[126,781,782,783,785],{},"The test serves a page from the Worker itself. No test runs this snippet with an ",[59,784,704],{}," binding.",[205,787,791],{"id":788,"anchor":789},"any-fetch-handler",{"label":790,"icon":184},"Section titled \"Any fetch handler\"","Any fetch handler",[53,793,795],{"language":211,"filename":794,"class":57,"wrap":14},"server.ts",[59,796,797,167,809,167,811,167,823,167,825,167,830,167,858,167,873,167,890,167,895,167,897,167,905,167,943],{"class":215},[63,798,799,801,803,805,807],{"class":65,"style":66},[63,800,221],{"style":220},[63,802,241],{"style":224},[63,804,228],{"style":220},[63,806,246],{"style":72},[63,808,234],{"style":224},[63,810],{"class":65,"style":66},[63,812,813,815,817,819,821],{"class":65,"style":66},[63,814,269],{"style":220},[63,816,273],{"style":272},[63,818,276],{"style":220},[63,820,76],{"style":279},[63,822,282],{"style":224},[63,824],{"class":65,"style":66},[63,826,827],{"class":65,"style":66},[63,828,829],{"style":563},"\u002F\u002F Stands for your app: any function from a Request to a Response.",[63,831,832,834,836,838,841,843,845,847,850,852,855],{"class":65,"style":66},[63,833,269],{"style":220},[63,835,295],{"style":279},[63,837,276],{"style":220},[63,839,840],{"style":224}," (",[63,842,612],{"style":69},[63,844,298],{"style":220},[63,846,690],{"style":69},[63,848,849],{"style":224},")",[63,851,298],{"style":220},[63,853,854],{"style":69}," Response",[63,856,857],{"style":220}," =>",[63,859,860,863,865,867,870],{"class":65,"style":66},[63,861,862],{"style":220},"  new",[63,864,854],{"style":279},[63,866,317],{"style":224},[63,868,869],{"style":72},"\"\u003Cmain>\u003Ch1>Guide\u003C\u002Fh1>\u003Cp>Hello\u003C\u002Fp>\u003C\u002Fmain>\"",[63,871,872],{"style":224},", {",[63,874,875,878,881,884,887],{"class":65,"style":66},[63,876,877],{"style":224},"    headers: { ",[63,879,880],{"style":72},"\"content-type\"",[63,882,883],{"style":224},": ",[63,885,886],{"style":72},"\"text\u002Fhtml; charset=utf-8\"",[63,888,889],{"style":224}," },",[63,891,892],{"class":65,"style":66},[63,893,894],{"style":224},"  });",[63,896],{"class":65,"style":66},[63,898,899,901,903],{"class":65,"style":66},[63,900,289],{"style":220},[63,902,477],{"style":220},[63,904,675],{"style":69},[63,906,907,909,911,913,915,917,919,921,924,927,929,932,934,936,938,941],{"class":65,"style":66},[63,908,680],{"style":279},[63,910,683],{"style":224},[63,912,612],{"style":69},[63,914,298],{"style":220},[63,916,690],{"style":69},[63,918,849],{"style":224},[63,920,298],{"style":220},[63,922,923],{"style":69}," Promise",[63,925,926],{"style":224},"\u003C",[63,928,202],{"style":69},[63,930,931],{"style":224},"> ",[63,933,358],{"style":220},[63,935,604],{"style":224},[63,937,406],{"style":279},[63,939,940],{"style":224},"(request, app)",[63,942,343],{"style":69},[63,944,945,947],{"class":65,"style":66},[63,946,750],{"style":69},[63,948,234],{"style":224},[126,950,951,954,955,957],{},[59,952,953],{},"next"," may return a ",[59,956,202],{}," or a promise of one.",[126,959,960,961,963],{},"CI installs the packed package and runs it on three runtimes. CI reports whether ",[59,962,485],{}," with mdream loads on Bun and Deno without requiring it to pass there:",[965,966,967,987],"table",{},[968,969,970],"thead",{},[971,972,973,977,982],"tr",{},[974,975,976],"th",{},"Runtime",[974,978,979],{},[59,980,981],{},"whoasks\u002Fcore",[974,983,984,986],{},[59,985,485],{}," (with mdream)",[988,989,990,1001,1011],"tbody",{},[971,991,992,996,999],{},[993,994,995],"td",{},"Node 22.12",[993,997,998],{},"Must pass",[993,1000,998],{},[971,1002,1003,1006,1008],{},[993,1004,1005],{},"Bun",[993,1007,998],{},[993,1009,1010],{},"Reported, not required",[971,1012,1013,1016,1018],{},[993,1014,1015],{},"Deno 2",[993,1017,998],{},[993,1019,1010],{},[179,1021,1025],{"id":1022,"anchor":1023},"check-it",{"label":1024,"icon":184},"Section titled \"Check it\"","Check it",[126,1027,1028,1029,1032],{},"Replace ",[59,1030,1031],{},"http:\u002F\u002Flocalhost:3000"," with your server's address.",[1034,1035,1036,1102,1131],"steps",{},[1037,1038,1039,1045,1066,1069],"step",{"index":50},[205,1040,1044],{"id":1041,"anchor":1042},"ask-for-markdown",{"label":1043,"icon":184},"Section titled \"Ask for Markdown\"","Ask for Markdown",[53,1046,1047],{"language":55,"frame":56,"class":57,"wrap":14},[59,1048,1049],{"class":61},[63,1050,1051,1054,1057,1060,1063],{"class":65,"style":66},[63,1052,1053],{"style":69},"curl",[63,1055,1056],{"style":272}," -i",[63,1058,1059],{"style":272}," -H",[63,1061,1062],{"style":72}," 'Accept: text\u002Fmarkdown'",[63,1064,1065],{"style":72}," http:\u002F\u002Flocalhost:3000\u002Fdocs\u002Fguide",[126,1067,1068],{},"Expected response:",[53,1070,1071],{"language":158,"class":57,"wrap":14},[59,1072,1073,167,1078,167,1083,167,1088,167,1093,167,1097],{"class":161},[63,1074,1075],{"class":65,"style":66},[63,1076,1077],{},"content-type: text\u002Fmarkdown; charset=utf-8",[63,1079,1080],{"class":65,"style":66},[63,1081,1082],{},"vary: Accept",[63,1084,1085],{"class":65,"style":66},[63,1086,1087],{},"",[63,1089,1090],{"class":65,"style":66},[63,1091,1092],{},"# Guide",[63,1094,1095],{"class":65,"style":66},[63,1096,1087],{},[63,1098,1099],{"class":65,"style":66},[63,1100,1101],{},"Hello",[1037,1103,1104,1110,1128],{"index":79},[205,1105,1109],{"id":1106,"anchor":1107},"ask-by-url",{"label":1108,"icon":184},"Section titled \"Ask by URL\"","Ask by URL",[53,1111,1112],{"language":55,"frame":56,"class":57,"wrap":14},[59,1113,1114,167,1121],{"class":61},[63,1115,1116,1118],{"class":65,"style":66},[63,1117,1053],{"style":69},[63,1119,1120],{"style":72}," http:\u002F\u002Flocalhost:3000\u002Fdocs\u002Fguide.md",[63,1122,1123,1125],{"class":65,"style":66},[63,1124,1053],{"style":69},[63,1126,1127],{"style":72}," 'http:\u002F\u002Flocalhost:3000\u002Fdocs\u002Fguide?format=md'",[126,1129,1130],{},"Both print the same Markdown.",[1037,1132,1133,1139,1151],{"index":96},[205,1134,1138],{"id":1135,"anchor":1136},"check-that-people-still-get-html",{"label":1137,"icon":184},"Section titled \"Check that people still get HTML\"","Check that people still get HTML",[53,1140,1141],{"language":55,"frame":56,"class":57,"wrap":14},[59,1142,1143],{"class":61},[63,1144,1145,1147,1149],{"class":65,"style":66},[63,1146,1053],{"style":69},[63,1148,1056],{"style":272},[63,1150,1065],{"style":72},[126,1152,1153,1154,1157,1158,407],{},"The page comes back as ",[59,1155,1156],{},"text\u002Fhtml"," with ",[59,1159,1082],{},[179,1161,1165],{"id":1162,"anchor":1163},"entries",{"label":1164,"icon":184},"Section titled \"Entries\"","Entries",[965,1167,1168,1178],{},[968,1169,1170],{},[971,1171,1172,1175],{},[974,1173,1174],{},"Import",[974,1176,1177],{},"Holds",[988,1179,1180,1194,1205],{},[971,1181,1182,1186],{},[993,1183,1184],{},[59,1185,485],{},[993,1187,1188,1190,1191,1193],{},[59,1189,485],{}," with mdream as its converter, ",[59,1192,143],{},", and the seven types",[971,1195,1196,1200],{},[993,1197,1198],{},[59,1199,981],{},[993,1201,1202,1204],{},[59,1203,485],{}," with no converter, and the seven types. It has no imports and stays under 10 kB",[971,1206,1207,1211],{},[993,1208,1209],{},[59,1210,149],{},[993,1212,1213],{},[59,1214,320],{},[126,1216,1217,1218,1220,1221,407],{},"Use ",[59,1219,981],{}," to keep mdream out of a bundle. See ",[1222,1223,1225],"a",{"href":1224},"\u002Fguide\u002Fpages#without-mdream","Without mdream",[179,1227,1230],{"id":953,"anchor":1228},{"label":1229,"icon":184},"Section titled \"Next\"","Next",[126,1232,1233,1234,1238,1239,1241,1242,1246],{},"Read ",[1222,1235,1237],{"href":1236},"\u002Fguide\u002Fpages","Pages"," for what ",[59,1240,406],{}," does with each request. Read ",[1222,1243,1245],{"href":1244},"\u002Fguide\u002Fapi-routes","API routes"," for routes that return data.",[1248,1256,1261,1262],{"id":181,"depth":15,"text":185,"children":1249},[1250,1252,1253,1254,1255],{"id":205,"depth":1251,"text":205},3,{"id":436,"depth":1251,"text":439},{"id":496,"depth":1251,"text":499},{"id":630,"depth":1251,"text":633},{"id":788,"depth":1251,"text":791},{"id":1022,"depth":15,"text":1025,"children":1257},[1258,1259,1260],{"id":1041,"depth":1251,"text":1044},{"id":1106,"depth":1251,"text":1109},{"id":1135,"depth":1251,"text":1138},{"id":1162,"depth":15,"text":1165},{"id":953,"depth":15,"text":1230},{"path":1264,"title":1265,"description":1266},"\u002Fguide","Introduction","whoasks reads each request's Accept header, .md twin URL or ?format= and answers the same URL as HTML, Markdown or JSON.",{"path":1236,"title":1237,"description":1268},"handle wraps a whole app. HTML pages become Markdown for agents, and real .md files, assets and JSON routes pass through as they are.",1796579200890,"78c9ee36-381e-45a5-bdf8-02819f0a7eb0"]