[{"data":1,"prerenderedAt":711},["ShallowReactive",2],{"content-en-\u002Fsyntax\u002Fincludes":3},{"id":4,"title":5,"body":6,"description":704,"extension":705,"meta":706,"navigation":157,"path":707,"seo":708,"stem":709,"__hash__":710},"content_en\u002Fsyntax\u002Fincludes.md","Includes and Components",{"type":7,"value":8,"toc":694},"minimark",[9,13,34,37,44,85,91,93,100,111,165,171,211,216,301,305,413,417,424,432,501,509,597,648,652,667,671,690],[10,11,5],"h1",{"id":12},"includes-and-components",[14,15,16,17,21,22,25,26,29,30,33],"p",{},"Reuse content across files with ",[18,19,20],"code",{},"include",", parameterized ",[18,23,24],{},"component",", and layout inheritance with ",[18,27,28],{},"extend"," + ",[18,31,32],{},"block",".",[35,36,20],"h2",{"id":20},[14,38,39,40,43],{},"Inlines another ",[18,41,42],{},".md"," file at the current position. No props. Parent scope variables are visible.",[45,46,51],"pre",{"className":47,"code":48,"language":49,"meta":50,"style":50},"language-markdown shiki shiki-themes github-light github-dark","\u003C!--\n@hg\ninclude .\u002Fpartials\u002Fdescription.md\n@endhg\n-->\n","markdown","",[18,52,53,61,67,73,79],{"__ignoreMap":50},[54,55,58],"span",{"class":56,"line":57},"line",1,[54,59,60],{},"\u003C!--\n",[54,62,64],{"class":56,"line":63},2,[54,65,66],{},"@hg\n",[54,68,70],{"class":56,"line":69},3,[54,71,72],{},"include .\u002Fpartials\u002Fdescription.md\n",[54,74,76],{"class":56,"line":75},4,[54,77,78],{},"@endhg\n",[54,80,82],{"class":56,"line":81},5,[54,83,84],{},"-->\n",[14,86,87,88,90],{},"Use ",[18,89,20],{}," when you only need to splice content — no parameters.",[35,92,24],{"id":24},[14,94,95,96,99],{},"Register a component file under an alias, then call it in ",[18,97,98],{},"&#123;&#123; &#125;&#125;"," expressions.",[14,101,102,106,107,110],{},[103,104,105],"strong",{},"Component file"," (",[18,108,109],{},"city-item.md","):",[45,112,114],{"className":47,"code":113,"language":49,"meta":50,"style":50},"---\nprops:\n  city:\n    type: string\n  population:\n    type: number\n---\n\nName: {{ city }} \u002F Population: {{ population.toLocaleString('en-US') }}\n",[18,115,116,121,126,131,136,141,147,152,159],{"__ignoreMap":50},[54,117,118],{"class":56,"line":57},[54,119,120],{},"---\n",[54,122,123],{"class":56,"line":63},[54,124,125],{},"props:\n",[54,127,128],{"class":56,"line":69},[54,129,130],{},"  city:\n",[54,132,133],{"class":56,"line":75},[54,134,135],{},"    type: string\n",[54,137,138],{"class":56,"line":81},[54,139,140],{},"  population:\n",[54,142,144],{"class":56,"line":143},6,[54,145,146],{},"    type: number\n",[54,148,150],{"class":56,"line":149},7,[54,151,120],{},[54,153,155],{"class":56,"line":154},8,[54,156,158],{"emptyLinePlaceholder":157},true,"\n",[54,160,162],{"class":56,"line":161},9,[54,163,164],{},"Name: {{ city }} \u002F Population: {{ population.toLocaleString('en-US') }}\n",[14,166,167,170],{},[103,168,169],{},"Parent file",":",[45,172,174],{"className":47,"code":173,"language":49,"meta":50,"style":50},"\u003C!--\n@hg\ncomponent city-item.md as cityItem\n@endhg\n-->\n\n- {{ cityItem({ city: \"Osaka\", population: 2825000 }) }}\n- {{ cityItem({ city: \"Kobe\", population: 1490000 }) }}\n",[18,175,176,180,184,189,193,197,201,206],{"__ignoreMap":50},[54,177,178],{"class":56,"line":57},[54,179,60],{},[54,181,182],{"class":56,"line":63},[54,183,66],{},[54,185,186],{"class":56,"line":69},[54,187,188],{},"component city-item.md as cityItem\n",[54,190,191],{"class":56,"line":75},[54,192,78],{},[54,194,195],{"class":56,"line":81},[54,196,84],{},[54,198,199],{"class":56,"line":143},[54,200,158],{"emptyLinePlaceholder":157},[54,202,203],{"class":56,"line":149},[54,204,205],{},"- {{ cityItem({ city: \"Osaka\", population: 2825000 }) }}\n",[54,207,208],{"class":56,"line":154},[54,209,210],{},"- {{ cityItem({ city: \"Kobe\", population: 1490000 }) }}\n",[212,213,215],"h3",{"id":214},"rules","Rules",[217,218,219,232],"table",{},[220,221,222],"thead",{},[223,224,225,229],"tr",{},[226,227,228],"th",{},"Rule",[226,230,231],{},"Detail",[233,234,235,250,261,273,281,289],"tbody",{},[223,236,237,241],{},[238,239,240],"td",{},"Registration",[238,242,243,246,247],{},[18,244,245],{},"component \u003Cpath> as \u003Cname>"," in ",[18,248,249],{},"@hg",[223,251,252,255],{},[238,253,254],{},"Call site",[238,256,257,260],{},[18,258,259],{},"&#123;&#123; name({ ... }) &#125;&#125;"," only",[223,262,263,266],{},[238,264,265],{},"Output",[238,267,268,269,272],{},"Must be ",[103,270,271],{},"single line"," — multiline output errors",[223,274,275,278],{},[238,276,277],{},"Alias scope",[238,279,280],{},"Visible in the defining file and included children",[223,282,283,286],{},[238,284,285],{},"Alias collision",[238,287,288],{},"Error — choose unique names",[223,290,291,294],{},[238,292,293],{},"extend inside component",[238,295,296,297,300],{},"Skipped with ",[18,298,299],{},"extend_in_component"," warning",[212,302,304],{"id":303},"in-each-loops","In each loops",[45,306,308],{"className":47,"code":307,"language":49,"meta":50,"style":50},"\u003C!--\n@hg\ncomponent city-item.md as cityItem\nconst cities = [\n  { name: \"Osaka\", population: 2825000 },\n  { name: \"Kobe\", population: 1490000 },\n]\n@endhg\n-->\n\n\u003C!--\n@hg\neach item in cities\n@endhg\n-->\n- {{ cityItem({ city: item.name, population: item.population }) }}\n\u003C!--\n@hg\nendeach\n@endhg\n-->\n",[18,309,310,314,318,322,327,332,337,342,346,350,355,360,365,371,376,381,387,392,397,403,408],{"__ignoreMap":50},[54,311,312],{"class":56,"line":57},[54,313,60],{},[54,315,316],{"class":56,"line":63},[54,317,66],{},[54,319,320],{"class":56,"line":69},[54,321,188],{},[54,323,324],{"class":56,"line":75},[54,325,326],{},"const cities = [\n",[54,328,329],{"class":56,"line":81},[54,330,331],{},"  { name: \"Osaka\", population: 2825000 },\n",[54,333,334],{"class":56,"line":143},[54,335,336],{},"  { name: \"Kobe\", population: 1490000 },\n",[54,338,339],{"class":56,"line":149},[54,340,341],{},"]\n",[54,343,344],{"class":56,"line":154},[54,345,78],{},[54,347,348],{"class":56,"line":161},[54,349,84],{},[54,351,353],{"class":56,"line":352},10,[54,354,158],{"emptyLinePlaceholder":157},[54,356,358],{"class":56,"line":357},11,[54,359,60],{},[54,361,363],{"class":56,"line":362},12,[54,364,66],{},[54,366,368],{"class":56,"line":367},13,[54,369,370],{},"each item in cities\n",[54,372,374],{"class":56,"line":373},14,[54,375,78],{},[54,377,379],{"class":56,"line":378},15,[54,380,84],{},[54,382,384],{"class":56,"line":383},16,[54,385,386],{},"- {{ cityItem({ city: item.name, population: item.population }) }}\n",[54,388,390],{"class":56,"line":389},17,[54,391,60],{},[54,393,395],{"class":56,"line":394},18,[54,396,66],{},[54,398,400],{"class":56,"line":399},19,[54,401,402],{},"endeach\n",[54,404,406],{"class":56,"line":405},20,[54,407,78],{},[54,409,411],{"class":56,"line":410},21,[54,412,84],{},[35,414,416],{"id":415},"extend-and-block","extend and block",[14,418,419,420,423],{},"Layout inheritance (Pug \u002F Blade style). Only ",[103,421,422],{},"single inheritance"," — no layout chains.",[14,425,426,106,429,110],{},[103,427,428],{},"Layout",[18,430,431],{},"layout.md",[45,433,435],{"className":47,"code":434,"language":49,"meta":50,"style":50},"# {{ title }}\n\n\u003C!--\n@hg\nblock contents\n@endhg\n-->\n\nDefault body text.\n\n\u003C!--\n@hg\nendblock\n@endhg\n-->\n",[18,436,437,442,446,450,454,459,463,467,471,476,480,484,488,493,497],{"__ignoreMap":50},[54,438,439],{"class":56,"line":57},[54,440,441],{},"# {{ title }}\n",[54,443,444],{"class":56,"line":63},[54,445,158],{"emptyLinePlaceholder":157},[54,447,448],{"class":56,"line":69},[54,449,60],{},[54,451,452],{"class":56,"line":75},[54,453,66],{},[54,455,456],{"class":56,"line":81},[54,457,458],{},"block contents\n",[54,460,461],{"class":56,"line":143},[54,462,78],{},[54,464,465],{"class":56,"line":149},[54,466,84],{},[54,468,469],{"class":56,"line":154},[54,470,158],{"emptyLinePlaceholder":157},[54,472,473],{"class":56,"line":161},[54,474,475],{},"Default body text.\n",[54,477,478],{"class":56,"line":352},[54,479,158],{"emptyLinePlaceholder":157},[54,481,482],{"class":56,"line":357},[54,483,60],{},[54,485,486],{"class":56,"line":362},[54,487,66],{},[54,489,490],{"class":56,"line":367},[54,491,492],{},"endblock\n",[54,494,495],{"class":56,"line":373},[54,496,78],{},[54,498,499],{"class":56,"line":378},[54,500,84],{},[14,502,503,106,506,110],{},[103,504,505],{},"Page",[18,507,508],{},"page.md",[45,510,512],{"className":47,"code":511,"language":49,"meta":50,"style":50},"\u003C!--\n@hg\nextend layout.md\nconst title = \"My Page\"\n@endhg\n-->\n\n\u003C!--\n@hg\nblock contents\n@endhg\n-->\n\nOverridden body.\n\n\u003C!--\n@hg\nendblock\n@endhg\n-->\n",[18,513,514,518,522,527,532,536,540,544,548,552,556,560,564,568,573,577,581,585,589,593],{"__ignoreMap":50},[54,515,516],{"class":56,"line":57},[54,517,60],{},[54,519,520],{"class":56,"line":63},[54,521,66],{},[54,523,524],{"class":56,"line":69},[54,525,526],{},"extend layout.md\n",[54,528,529],{"class":56,"line":75},[54,530,531],{},"const title = \"My Page\"\n",[54,533,534],{"class":56,"line":81},[54,535,78],{},[54,537,538],{"class":56,"line":143},[54,539,84],{},[54,541,542],{"class":56,"line":149},[54,543,158],{"emptyLinePlaceholder":157},[54,545,546],{"class":56,"line":154},[54,547,60],{},[54,549,550],{"class":56,"line":161},[54,551,66],{},[54,553,554],{"class":56,"line":352},[54,555,458],{},[54,557,558],{"class":56,"line":357},[54,559,78],{},[54,561,562],{"class":56,"line":362},[54,563,84],{},[54,565,566],{"class":56,"line":367},[54,567,158],{"emptyLinePlaceholder":157},[54,569,570],{"class":56,"line":373},[54,571,572],{},"Overridden body.\n",[54,574,575],{"class":56,"line":378},[54,576,158],{"emptyLinePlaceholder":157},[54,578,579],{"class":56,"line":383},[54,580,60],{},[54,582,583],{"class":56,"line":389},[54,584,66],{},[54,586,587],{"class":56,"line":394},[54,588,492],{},[54,590,591],{"class":56,"line":399},[54,592,78],{},[54,594,595],{"class":56,"line":405},[54,596,84],{},[217,598,599,607],{},[220,600,601],{},[223,602,603,605],{},[226,604,228],{},[226,606,231],{},[233,608,609,622,630,638],{},[223,610,611,616],{},[238,612,613,615],{},[18,614,28],{}," position",[238,617,618,619,621],{},"First ",[18,620,249],{}," block (front matter may precede it)",[223,623,624,627],{},[238,625,626],{},"Child body outside blocks",[238,628,629],{},"Ignored",[223,631,632,635],{},[238,633,634],{},"Unoverridden blocks",[238,636,637],{},"Layout default kept",[223,639,640,643],{},[238,641,642],{},"Close tag",[238,644,645,260],{},[18,646,647],{},"endblock",[35,649,651],{"id":650},"circular-references","Circular references",[14,653,654,655,657,658,657,660,662,663,666],{},"Circular ",[18,656,20],{}," \u002F ",[18,659,24],{},[18,661,28],{}," chains are detected, skipped, and reported as ",[18,664,665],{},"circular_include"," warnings.",[35,668,670],{"id":669},"related","Related",[672,673,674,683],"ul",{},[675,676,677,682],"li",{},[678,679,681],"a",{"href":680},"\u002Fen\u002Fsyntax\u002Ffront-matter","Front matter"," — component props",[675,684,685,689],{},[678,686,688],{"href":687},"\u002Fen\u002Fsyntax\u002Fpaths-and-security","Paths and security"," — path resolution",[691,692,693],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":50,"searchDepth":63,"depth":63,"links":695},[696,697,701,702,703],{"id":20,"depth":63,"text":20},{"id":24,"depth":63,"text":24,"children":698},[699,700],{"id":214,"depth":69,"text":215},{"id":303,"depth":69,"text":304},{"id":415,"depth":63,"text":416},{"id":650,"depth":63,"text":651},{"id":669,"depth":63,"text":670},"include, component, extend, and block templating.","md",{},"\u002Fsyntax\u002Fincludes",{"title":5,"description":704},"syntax\u002Fincludes","pcExkSKUk-7JhgJzWBnhqA-rUX-OQZtZ9tly0pHsN98",1787223114978]