[{"data":1,"prerenderedAt":540,"buildId":541},["ShallowReactive",2],{"page:\u002Fextensions\u002Fkubb-labs\u002Fparser-md":3},{"id":4,"frontmatter":5,"title":6,"heading":6,"body":7,"path":539,"source":4},"extensions\u002Fkubb-labs\u002Fparser-md\u002Findex.md",{},"Markdown",{"type":8,"value":9,"toc":530},"minimark",[10,27,30,35,135,165,169,185,197,201,204,274,278,287],[11,12,13,14,18,19,22,23,26],"p",{},"The Markdown parser writes the ",[15,16,17],"code",{},".md"," and ",[15,20,21],{},".markdown"," files that plugins generate, with YAML frontmatter from each file's ",[15,24,25],{},"meta.frontmatter",".",[11,28,29],{},"It joins each file's source blocks with blank lines and writes the frontmatter above the content.",[31,32,34],"h2",{"id":33},"installation","Installation",[36,37,39,62,82,100,118],"code-group",{"sync":38},"install",[40,41,46],"pre",{"language":42,"filename":43,"code":44,"class":45},"shell","kubb","kubb add parser-md","highlights",[15,47,49],{"class":48},"language-shell",[50,51,54,58],"span",{"class":52,"style":53},"line","display: inline",[50,55,57],{"style":56},"color:#6f42c1;--hls-dark:#b392f0","kubb ",[50,59,61],{"style":60},"color:#24292e;--hls-dark:#e1e4e8","add parser-md",[40,63,66],{"language":42,"filename":64,"code":65,"class":45},"bun","bun add -d @kubb\u002Fparser-md",[15,67,68],{"class":48},[50,69,70,73,76,79],{"class":52,"style":53},[50,71,72],{"style":56},"bun ",[50,74,75],{"style":60},"add -d ",[50,77,78],{"style":60},"@",[50,80,81],{"style":60},"kubb\u002Fparser-md",[40,83,86],{"language":42,"filename":84,"code":85,"class":45},"pnpm","pnpm add -D @kubb\u002Fparser-md",[15,87,88],{"class":48},[50,89,90,93,96,98],{"class":52,"style":53},[50,91,92],{"style":56},"pnpm ",[50,94,95],{"style":60},"add -D ",[50,97,78],{"style":60},[50,99,81],{"style":60},[40,101,104],{"language":42,"filename":102,"code":103,"class":45},"npm","npm install --save-dev @kubb\u002Fparser-md",[15,105,106],{"class":48},[50,107,108,111,114,116],{"class":52,"style":53},[50,109,110],{"style":56},"npm ",[50,112,113],{"style":60},"install --save-dev ",[50,115,78],{"style":60},[50,117,81],{"style":60},[40,119,122],{"language":42,"filename":120,"code":121,"class":45},"yarn","yarn add -D @kubb\u002Fparser-md",[15,123,124],{"class":48},[50,125,126,129,131,133],{"class":52,"style":53},[50,127,128],{"style":56},"yarn ",[50,130,95],{"style":60},[50,132,78],{"style":60},[50,134,81],{"style":60},[11,136,137,140,141,146,147,150,151,154,155,157,158,164],{},[15,138,139],{},"kubb add"," installs the version the ",[142,143,145],"a",{"href":144},"\u002Fregistry","Kubb registry"," pins and adds ",[15,148,149],{},"parserMd()"," to ",[15,152,153],{},"kubb.config.ts",". It needs a ",[15,156,153],{},", so run ",[142,159,161],{"href":160},"\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Finit",[15,162,163],{},"kubb init"," first in a new project.",[31,166,168],{"id":167},"setup","Setup",[11,170,171,172,175,176,178,179,18,182,26],{},"No setup is needed. ",[15,173,174],{},"defineConfig"," and the bundler integrations register ",[15,177,149],{}," by default, next to ",[15,180,181],{},"parserTs()",[15,183,184],{},"parserTsx()",[186,187,189,190,193,194,196],"blockquote",{"as":188},"warning","A custom ",[15,191,192],{},"parsers"," array replaces the default set, so add ",[15,195,149],{}," to it yourself and list every parser your plugins need. A file that no parser claims is written as its source text only, without imports, exports, banner, or footer.",[31,198,200],{"id":199},"options-worth-knowing","Options worth knowing",[11,202,203],{},"The parser takes no options. A plugin controls the output per file:",[205,206,207,223],"table",{},[208,209,210],"thead",{},[211,212,213,217,220],"tr",{},[214,215,216],"th",{},"File setting",[214,218,219],{},"Default",[214,221,222],{},"What it does",[224,225,226,250,262],"tbody",{},[211,227,228,236,239],{},[229,230,231],"td",{},[142,232,234],{"href":233},"https:\u002F\u002Fkubb.dev\u002Fextensions\u002Fkubb-labs\u002Fparser-md\u002Foptions#frontmatter",[15,235,25],{},[229,237,238],{},"None",[229,240,241,242,245,246,249],{},"Writes the object as YAML frontmatter. ",[15,243,244],{},"null"," or ",[15,247,248],{},"{}"," writes none.",[211,251,252,257,259],{},[229,253,254],{},[15,255,256],{},"banner",[229,258,238],{},[229,260,261],{},"Goes above the frontmatter.",[211,263,264,269,271],{},[229,265,266],{},[15,267,268],{},"footer",[229,270,238],{},[229,272,273],{},"Goes below the content.",[31,275,277],{"id":276},"example","Example",[11,279,280,281,283,284,286],{},"This config sets a custom ",[15,282,192],{}," array that keeps the Markdown parser. A plugin file with ",[15,285,25],{}," then prints like this:",[36,288,289,486],{},[40,290,293],{"language":291,"filename":153,"code":292,"class":45},"typescript","import { defineConfig } from 'kubb\u002Fconfig'\nimport { parserMd } from '@kubb\u002Fparser-md'\nimport { parserTs, parserTsx } from '@kubb\u002Fparser-ts'\nimport { pluginTs } from '@kubb\u002Fplugin-ts'\n\nexport default defineConfig({\n input: '.\u002FpetStore.yaml',\n output: { path: '.\u002Fsrc\u002Fgen' },\n parsers: [parserTs(), parserTsx(), parserMd()],\n plugins: [pluginTs()],\n})",[15,294,296,319,320,319,336,319,358,319,374,319,376,319,389,319,406,319,430,319,463,319,481],{"class":295},"language-typescript",[50,297,298,302,306,309,312,315],{"class":52,"style":53},[50,299,301],{"style":300},"color:#d73a49;--hls-dark:#f97583","import ",[50,303,305],{"style":304},"color:#005cc5;--hls-dark:#79b8ff","{ ",[50,307,308],{"style":60},"defineConfig ",[50,310,311],{"style":304},"} ",[50,313,314],{"style":300},"from ",[50,316,318],{"style":317},"color:#032f62;--hls-dark:#9ecbff","'kubb\u002Fconfig'","\n",[50,321,322,324,326,329,331,333],{"class":52,"style":53},[50,323,301],{"style":300},[50,325,305],{"style":304},[50,327,328],{"style":60},"parserMd ",[50,330,311],{"style":304},[50,332,314],{"style":300},[50,334,335],{"style":317},"'@kubb\u002Fparser-md'",[50,337,338,340,342,345,348,351,353,355],{"class":52,"style":53},[50,339,301],{"style":300},[50,341,305],{"style":304},[50,343,344],{"style":60},"parserTs",[50,346,347],{"style":300},", ",[50,349,350],{"style":60},"parserTsx ",[50,352,311],{"style":304},[50,354,314],{"style":300},[50,356,357],{"style":317},"'@kubb\u002Fparser-ts'",[50,359,360,362,364,367,369,371],{"class":52,"style":53},[50,361,301],{"style":300},[50,363,305],{"style":304},[50,365,366],{"style":60},"pluginTs ",[50,368,311],{"style":304},[50,370,314],{"style":300},[50,372,373],{"style":317},"'@kubb\u002Fplugin-ts'",[50,375],{"class":52,"style":53},[50,377,378,381,384,386],{"class":52,"style":53},[50,379,380],{"style":300},"export ",[50,382,383],{"style":300},"default ",[50,385,174],{"style":56},[50,387,388],{"style":304},"({",[50,390,391,394,397,400,403],{"class":52,"style":53},[50,392,393],{"style":304}," ",[50,395,396],{"style":304},"input",[50,398,399],{"style":300},": ",[50,401,402],{"style":317},"'.\u002FpetStore.yaml'",[50,404,405],{"style":300},",",[50,407,408,410,413,415,417,420,422,425,428],{"class":52,"style":53},[50,409,393],{"style":300},[50,411,412],{"style":304},"output",[50,414,399],{"style":300},[50,416,305],{"style":304},[50,418,419],{"style":304},"path",[50,421,399],{"style":300},[50,423,424],{"style":317},"'.\u002Fsrc\u002Fgen' ",[50,426,427],{"style":304},"}",[50,429,405],{"style":300},[50,431,432,434,436,438,441,443,446,448,451,453,455,458,461],{"class":52,"style":53},[50,433,393],{"style":300},[50,435,192],{"style":304},[50,437,399],{"style":300},[50,439,440],{"style":304},"[",[50,442,344],{"style":56},[50,444,445],{"style":304},"()",[50,447,347],{"style":300},[50,449,450],{"style":56},"parserTsx",[50,452,445],{"style":304},[50,454,347],{"style":300},[50,456,457],{"style":56},"parserMd",[50,459,460],{"style":304},"()]",[50,462,405],{"style":300},[50,464,465,467,470,472,474,477,479],{"class":52,"style":53},[50,466,393],{"style":300},[50,468,469],{"style":304},"plugins",[50,471,399],{"style":300},[50,473,440],{"style":304},[50,475,476],{"style":56},"pluginTs",[50,478,460],{"style":304},[50,480,405],{"style":300},[50,482,483],{"class":52,"style":53},[50,484,485],{"style":304},"})",[40,487,491],{"language":488,"filename":489,"code":490,"class":45},"md","src\u002Fgen\u002FREADME.md","---\ntitle: API Reference\nlayout: doc\n---\n\nEndpoints generated from the OpenAPI spec.",[15,492,494,319,499,319,509,319,519,319,523,319,525],{"class":493},"language-md",[50,495,496],{"class":52,"style":53},[50,497,498],{"style":60},"---",[50,500,501,504,506],{"class":52,"style":53},[50,502,503],{"style":304},"title",[50,505,399],{"style":300},[50,507,508],{"style":317},"API Reference",[50,510,511,514,516],{"class":52,"style":53},[50,512,513],{"style":304},"layout",[50,515,399],{"style":300},[50,517,518],{"style":317},"doc",[50,520,521],{"class":52,"style":53},[50,522,498],{"style":60},[50,524],{"class":52,"style":53},[50,526,527],{"class":52,"style":53},[50,528,529],{"style":60},"Endpoints generated from the OpenAPI spec.",{"title":531,"searchDepth":532,"depth":532,"links":533},"",5,[534,536,537,538],{"id":33,"depth":535,"text":34},2,{"id":167,"depth":535,"text":168},{"id":199,"depth":535,"text":200},{"id":276,"depth":535,"text":277},"\u002Fextensions\u002Fkubb-labs\u002Fparser-md",1795727679477,"1b64b1eb-29b7-4f90-ad41-6f24721e1669"]