[{"data":1,"prerenderedAt":2718},["ShallowReactive",2],{"navigation_docs":3,"-kits-component-schemas":205,"-kits-component-schemas-surround":2713},[4,31,67,111,132,163,189],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":30},"Getting started","i-lucide-rocket","\u002Fgetting-started","1.getting-started",[10,15,20,25],{"title":11,"path":12,"stem":13,"icon":14},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction","i-lucide-house",{"title":16,"path":17,"stem":18,"icon":19},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation","i-lucide-download",{"title":21,"path":22,"stem":23,"icon":24},"Quick start","\u002Fgetting-started\u002Fquick-start","1.getting-started\u002F3.quick-start","i-lucide-play",{"title":26,"path":27,"stem":28,"icon":29},"Agent Skill","\u002Fgetting-started\u002Fagent-skill","1.getting-started\u002F4.agent-skill","i-lucide-sparkles",false,{"title":32,"icon":33,"path":34,"stem":35,"children":36,"page":30},"Authoring","i-lucide-pen-line","\u002Fauthoring","2.authoring",[37,42,47,52,57,62],{"title":38,"path":39,"stem":40,"icon":41},"Comark syntax","\u002Fauthoring\u002Fcomark-syntax","2.authoring\u002F1.comark-syntax","i-lucide-file-code",{"title":43,"path":44,"stem":45,"icon":46},"Frontmatter","\u002Fauthoring\u002Ffrontmatter","2.authoring\u002F2.frontmatter","i-lucide-heading",{"title":48,"path":49,"stem":50,"icon":51},"Components","\u002Fauthoring\u002Fcomponents","2.authoring\u002F3.components","i-lucide-blocks",{"title":53,"path":54,"stem":55,"icon":56},"Merge tags and data","\u002Fauthoring\u002Fmerge-tags-and-data","2.authoring\u002F4.merge-tags-and-data","i-lucide-braces",{"title":58,"path":59,"stem":60,"icon":61},"Actions and spans","\u002Fauthoring\u002Factions-and-spans","2.authoring\u002F5.actions-and-spans","i-lucide-mouse-pointer-click",{"title":63,"path":64,"stem":65,"icon":66},"Compile errors","\u002Fauthoring\u002Fcompile-errors","2.authoring\u002F6.compile-errors","i-lucide-circle-alert",{"title":68,"icon":69,"path":70,"stem":71,"children":72,"page":30},"Kits","i-lucide-palette","\u002Fkits","3.kits",[73,78,83,87,91,96,101,106],{"title":74,"path":75,"stem":76,"icon":77},"What is a kit","\u002Fkits\u002Fwhat-is-a-kit","3.kits\u002F1.what-is-a-kit","i-lucide-package",{"title":79,"path":80,"stem":81,"icon":82},"kit.yaml","\u002Fkits\u002Fkit-yaml","3.kits\u002F2.kit-yaml","i-lucide-file-cog",{"title":84,"path":85,"stem":86,"icon":51},"Component schemas","\u002Fkits\u002Fcomponent-schemas","3.kits\u002F3.component-schemas",{"title":88,"path":89,"stem":90,"icon":56},"Templates and views","\u002Fkits\u002Ftemplates-and-views","3.kits\u002F4.templates-and-views",{"title":92,"path":93,"stem":94,"icon":95},"Template checking","\u002Fkits\u002Ftemplate-checking","3.kits\u002F5.template-checking","i-lucide-shield-check",{"title":97,"path":98,"stem":99,"icon":100},"Go types and funcs","\u002Fkits\u002Fgo-types-and-funcs","3.kits\u002F6.go-types-and-funcs","i-lucide-code",{"title":102,"path":103,"stem":104,"icon":105},"Email-safe HTML","\u002Fkits\u002Femail-safe-html","3.kits\u002F7.email-safe-html","i-lucide-mail-check",{"title":107,"path":108,"stem":109,"icon":110},"Plain text","\u002Fkits\u002Fplain-text","3.kits\u002F8.plain-text","i-lucide-file-text",{"title":112,"icon":113,"path":114,"stem":115,"children":116,"page":30},"Sending","i-lucide-send","\u002Fsending","4.sending",[117,122,127],{"title":118,"path":119,"stem":120,"icon":121},"Profiles and config","\u002Fsending\u002Fprofiles-and-config","4.sending\u002F1.profiles-and-config","i-lucide-settings",{"title":123,"path":124,"stem":125,"icon":126},"Message and MIME","\u002Fsending\u002Fmessage-and-mime","4.sending\u002F2.message-and-mime","i-lucide-mail",{"title":128,"path":129,"stem":130,"icon":131},"SMTP","\u002Fsending\u002Fsmtp","4.sending\u002F3.smtp","i-lucide-server",{"title":133,"icon":134,"path":135,"stem":136,"children":137,"page":30},"Tooling","i-lucide-wrench","\u002Ftooling","5.tooling",[138,143,148,153,158],{"title":139,"path":140,"stem":141,"icon":142},"The lttr CLI","\u002Ftooling\u002Fcli","5.tooling\u002F1.cli","i-lucide-terminal",{"title":144,"path":145,"stem":146,"icon":147},"Studio","\u002Ftooling\u002Fstudio","5.tooling\u002F2.studio","i-lucide-eye",{"title":149,"path":150,"stem":151,"icon":152},"Editor setup","\u002Ftooling\u002Feditor-setup","5.tooling\u002F3.editor-setup","i-lucide-plug",{"title":154,"path":155,"stem":156,"icon":157},"Screenshots","\u002Ftooling\u002Fscreenshots","5.tooling\u002F4.screenshots","i-lucide-camera",{"title":159,"path":160,"stem":161,"icon":162},"Goldens and testing","\u002Ftooling\u002Fgoldens-and-testing","5.tooling\u002F5.goldens-and-testing","i-lucide-flask-conical",{"title":164,"icon":165,"path":166,"stem":167,"children":168,"page":30},"Guides","i-lucide-book-open","\u002Fguides","6.guides",[169,174,179,184],{"title":170,"path":171,"stem":172,"icon":173},"Build your own kit","\u002Fguides\u002Fbuild-your-own-kit","6.guides\u002F1.build-your-own-kit","i-lucide-hammer",{"title":175,"path":176,"stem":177,"icon":178},"The Quiet kit","\u002Fguides\u002Fthe-quiet-kit","6.guides\u002F2.the-quiet-kit","i-lucide-mail-open",{"title":180,"path":181,"stem":182,"icon":183},"Migrating from v0.1","\u002Fguides\u002Fmigrating-from-v0-1","6.guides\u002F3.migrating-from-v0-1","i-lucide-arrow-right-left",{"title":185,"path":186,"stem":187,"icon":188},"Releasing","\u002Fguides\u002Freleasing","6.guides\u002F4.releasing","i-lucide-tag",{"title":190,"icon":191,"path":192,"stem":193,"children":194,"page":30},"Reference","i-lucide-library","\u002Freference","7.reference",[195,200],{"title":196,"path":197,"stem":198,"icon":199},"API reference","\u002Freference\u002Fapi-reference","7.reference\u002F1.api-reference","i-lucide-list-tree",{"title":201,"path":202,"stem":203,"icon":204},"Gallery","\u002Freference\u002Fgallery","7.reference\u002F2.gallery","i-lucide-images",{"id":206,"title":84,"body":207,"description":2706,"extension":2707,"links":2708,"meta":2709,"navigation":2710,"path":85,"seo":2711,"stem":86,"__hash__":2712},"docs\u002F3.kits\u002F3.component-schemas.md",{"type":208,"value":209,"toc":2693},"minimark",[210,219,224,227,383,386,404,450,454,605,610,614,632,819,983,1068,1078,1160,1164,1190,1208,1212,1217,1242,1245,1374,1523,1534,1538,1551,1637,1708,1716,1732,1735,1740,1824,1830,1879,1886,1951,1974,2063,2087,2094,2104,2107,2247,2300,2304,2346,2350,2356,2513,2578,2583,2609,2623,2627,2637,2643,2662,2668,2673,2677,2689],[211,212,213,214,218],"p",{},"Every component has a schema, ",[215,216,217],"code",{},"components\u002F\u003Cname>\u002Fcomponent.yaml",". It says what the component accepts in a Markdown template: which attributes, which Go values, which Markdown content, which nested components, where it may sit and how much space goes around it. lttr checks every template against these schemas when it compiles, so a template that breaks a rule never renders.",[220,221,223],"h2",{"id":222},"read-a-whole-schema","Read a whole schema",[211,225,226],{},"This is the tutorial kit's invoice component:",[228,229,235],"pre",{"className":230,"code":231,"filename":232,"language":233,"meta":234,"style":234},"language-yaml shiki shiki-themes github-light-high-contrast github-light-high-contrast github-dark","# An invoice: the bound Invoice's lines, then its total. A template\n# passes the invoice with a binding: ::invoice{:invoice=\"invoice\"}.\nname: invoice\nattrs:\n  title: { type: text, default: Invoice }\nbindings:\n  invoice: { type: Invoice, required: true }\ncontent: none\nspacing:\n  top: size.block\n  bottom: size.gap\n","tutorial\u002Fkit\u002Fcomponents\u002Finvoice\u002Fcomponent.yaml","yaml","",[215,236,237,246,252,267,276,307,315,342,353,361,372],{"__ignoreMap":234},[238,239,242],"span",{"class":240,"line":241},"line",1,[238,243,245],{"class":244},"sBq4M","# An invoice: the bound Invoice's lines, then its total. A template\n",[238,247,249],{"class":240,"line":248},2,[238,250,251],{"class":244},"# passes the invoice with a binding: ::invoice{:invoice=\"invoice\"}.\n",[238,253,255,259,263],{"class":240,"line":254},3,[238,256,258],{"class":257},"s71pN","name",[238,260,262],{"class":261},"sihDN",": ",[238,264,266],{"class":265},"sRBGO","invoice\n",[238,268,270,273],{"class":240,"line":269},4,[238,271,272],{"class":257},"attrs",[238,274,275],{"class":261},":\n",[238,277,279,282,285,288,290,293,296,299,301,304],{"class":240,"line":278},5,[238,280,281],{"class":257},"  title",[238,283,284],{"class":261},": { ",[238,286,287],{"class":257},"type",[238,289,262],{"class":261},[238,291,292],{"class":265},"text",[238,294,295],{"class":261},", ",[238,297,298],{"class":257},"default",[238,300,262],{"class":261},[238,302,303],{"class":265},"Invoice",[238,305,306],{"class":261}," }\n",[238,308,310,313],{"class":240,"line":309},6,[238,311,312],{"class":257},"bindings",[238,314,275],{"class":261},[238,316,318,321,323,325,327,329,331,334,336,340],{"class":240,"line":317},7,[238,319,320],{"class":257},"  invoice",[238,322,284],{"class":261},[238,324,287],{"class":257},[238,326,262],{"class":261},[238,328,303],{"class":265},[238,330,295],{"class":261},[238,332,333],{"class":257},"required",[238,335,262],{"class":261},[238,337,339],{"class":338},"sTl1q","true",[238,341,306],{"class":261},[238,343,345,348,350],{"class":240,"line":344},8,[238,346,347],{"class":257},"content",[238,349,262],{"class":261},[238,351,352],{"class":265},"none\n",[238,354,356,359],{"class":240,"line":355},9,[238,357,358],{"class":257},"spacing",[238,360,275],{"class":261},[238,362,364,367,369],{"class":240,"line":363},10,[238,365,366],{"class":257},"  top",[238,368,262],{"class":261},[238,370,371],{"class":265},"size.block\n",[238,373,375,378,380],{"class":240,"line":374},11,[238,376,377],{"class":257},"  bottom",[238,379,262],{"class":261},[238,381,382],{"class":265},"size.gap\n",[211,384,385],{},"A template uses it with a binding and no content:",[228,387,392],{"className":388,"code":389,"filename":390,"language":391,"meta":234,"style":234},"language-markdown shiki shiki-themes github-light-high-contrast github-light-high-contrast github-dark","::invoice{:invoice=\"invoice\"}\n::\n","tutorial\u002Ftemplates\u002Finvoice.md#L12-L13","markdown",[215,393,394,399],{"__ignoreMap":234},[238,395,396],{"class":240,"line":241},[238,397,398],{"class":261},"::invoice{:invoice=\"invoice\"}\n",[238,400,401],{"class":240,"line":248},[238,402,403],{"class":261},"::\n",[405,406,407,417,425,439],"ul",{},[408,409,410,413,414,416],"li",{},[215,411,412],{},"title"," is an optional text attribute that defaults to ",[215,415,303],{},".",[408,418,419,422,423,416],{},[215,420,421],{},"invoice"," is a required binding: a Go value of the registered type ",[215,424,303],{},[408,426,427,430,431,434,435,438],{},[215,428,429],{},"content: none",": anything between ",[215,432,433],{},"::invoice"," and ",[215,436,437],{},"::"," is a compile error.",[408,440,441,442,445,446,449],{},"The spacing puts ",[215,443,444],{},"size.block"," above the component and ",[215,447,448],{},"size.gap"," below it.",[220,451,453],{"id":452},"know-the-keys","Know the keys",[455,456,457,470],"table",{},[458,459,460],"thead",{},[461,462,463,467],"tr",{},[464,465,466],"th",{},"Key",[464,468,469],{},"What it sets",[471,472,473,483,501,518,530,542,559,569,579,596],"tbody",{},[461,474,475,480],{},[476,477,478],"td",{},[215,479,258],{},[476,481,482],{},"Optional. When present, it must equal the directory name",[461,484,485,490],{},[476,486,487],{},[215,488,489],{},"aliases",[476,491,492,493,496,497,500],{},"Other names for the component, such as ",[215,494,495],{},"[prose]",". Names match ",[215,498,499],{},"[a-z][a-z0-9_-]*",", and no two components may share one. Lookup is case-insensitive",[461,502,503,508],{},[476,504,505],{},[215,506,507],{},"class",[476,509,510,511,514,515],{},"A label that ",[215,512,513],{},"spacing.after"," rules match as ",[215,516,517],{},".class",[461,519,520,524],{},[476,521,522],{},[215,523,272],{},[476,525,526,527],{},"Typed attributes, ",[215,528,529],{},"::name{key=\"value\"}",[461,531,532,536],{},[476,533,534],{},[215,535,312],{},[476,537,538,539],{},"Go values, ",[215,540,541],{},"::name{:key=\"path\"}",[461,543,544,548],{},[476,545,546],{},[215,547,347],{},[476,549,550,551,554,555,558],{},"The Markdown it holds: ",[215,552,553],{},"none"," (the default when the key is absent), ",[215,556,557],{},"blocks",", or a mapping of rules",[461,560,561,566],{},[476,562,563],{},[215,564,565],{},"children",[476,567,568],{},"One kind of nested component, with counts. A child may have children of its own",[461,570,571,576],{},[476,572,573],{},[215,574,575],{},"must_follow",[476,577,578],{},"The components it must directly follow",[461,580,581,586],{},[476,582,583],{},[215,584,585],{},"limits",[476,587,588,589,434,592,595],{},"Caps on ",[215,590,591],{},":button",[215,593,594],{},":link"," inside its content",[461,597,598,602],{},[476,599,600],{},[215,601,358],{},[476,603,604],{},"Its padding, with rules for its position and neighbours",[211,606,607,608,416],{},"Any other key is a load error, as in ",[215,609,79],{},[220,611,613],{"id":612},"type-the-attributes","Type the attributes",[211,615,616,617,619,620,295,622,295,625,627,628,631],{},"Each attribute has a ",[215,618,287],{}," and, optionally, ",[215,621,333],{},[215,623,624],{},"required_with",[215,626,298],{}," or ",[215,629,630],{},"values",". Plain's image component has required, optional and defaulted attributes:",[228,633,636],{"className":230,"code":634,"filename":635,"language":233,"meta":234,"style":234},"# A full-width image (or narrower with width), with an optional link and\n# caption.\nname: image\nattrs:\n  src:     { type: url, required: true }\n  alt:     { type: text, required: true }\n  # Width in px. The default and the cap in html.tmpl are size.content in\n  # kit.yaml (templates cannot compare an int with a token); change all\n  # three together.\n  width:   { type: int, default: \"496\" }\n  href:    { type: url }\n  caption: { type: text }\ncontent: none\nspacing:\n  top: 0\n  bottom: size.gap\n","plain\u002Fcomponents\u002Fimage\u002Fcomponent.yaml",[215,637,638,643,648,657,663,688,711,716,721,726,752,768,784,793,800,810],{"__ignoreMap":234},[238,639,640],{"class":240,"line":241},[238,641,642],{"class":244},"# A full-width image (or narrower with width), with an optional link and\n",[238,644,645],{"class":240,"line":248},[238,646,647],{"class":244},"# caption.\n",[238,649,650,652,654],{"class":240,"line":254},[238,651,258],{"class":257},[238,653,262],{"class":261},[238,655,656],{"class":265},"image\n",[238,658,659,661],{"class":240,"line":269},[238,660,272],{"class":257},[238,662,275],{"class":261},[238,664,665,668,671,673,675,678,680,682,684,686],{"class":240,"line":278},[238,666,667],{"class":257},"  src",[238,669,670],{"class":261},":     { ",[238,672,287],{"class":257},[238,674,262],{"class":261},[238,676,677],{"class":265},"url",[238,679,295],{"class":261},[238,681,333],{"class":257},[238,683,262],{"class":261},[238,685,339],{"class":338},[238,687,306],{"class":261},[238,689,690,693,695,697,699,701,703,705,707,709],{"class":240,"line":309},[238,691,692],{"class":257},"  alt",[238,694,670],{"class":261},[238,696,287],{"class":257},[238,698,262],{"class":261},[238,700,292],{"class":265},[238,702,295],{"class":261},[238,704,333],{"class":257},[238,706,262],{"class":261},[238,708,339],{"class":338},[238,710,306],{"class":261},[238,712,713],{"class":240,"line":317},[238,714,715],{"class":244},"  # Width in px. The default and the cap in html.tmpl are size.content in\n",[238,717,718],{"class":240,"line":344},[238,719,720],{"class":244},"  # kit.yaml (templates cannot compare an int with a token); change all\n",[238,722,723],{"class":240,"line":355},[238,724,725],{"class":244},"  # three together.\n",[238,727,728,731,734,736,738,741,743,745,747,750],{"class":240,"line":363},[238,729,730],{"class":257},"  width",[238,732,733],{"class":261},":   { ",[238,735,287],{"class":257},[238,737,262],{"class":261},[238,739,740],{"class":265},"int",[238,742,295],{"class":261},[238,744,298],{"class":257},[238,746,262],{"class":261},[238,748,749],{"class":265},"\"496\"",[238,751,306],{"class":261},[238,753,754,757,760,762,764,766],{"class":240,"line":374},[238,755,756],{"class":257},"  href",[238,758,759],{"class":261},":    { ",[238,761,287],{"class":257},[238,763,262],{"class":261},[238,765,677],{"class":265},[238,767,306],{"class":261},[238,769,771,774,776,778,780,782],{"class":240,"line":770},12,[238,772,773],{"class":257},"  caption",[238,775,284],{"class":261},[238,777,287],{"class":257},[238,779,262],{"class":261},[238,781,292],{"class":265},[238,783,306],{"class":261},[238,785,787,789,791],{"class":240,"line":786},13,[238,788,347],{"class":257},[238,790,262],{"class":261},[238,792,352],{"class":265},[238,794,796,798],{"class":240,"line":795},14,[238,797,358],{"class":257},[238,799,275],{"class":261},[238,801,803,805,807],{"class":240,"line":802},15,[238,804,366],{"class":257},[238,806,262],{"class":261},[238,808,809],{"class":338},"0\n",[238,811,813,815,817],{"class":240,"line":812},16,[238,814,377],{"class":257},[238,816,262],{"class":261},[238,818,382],{"class":265},[455,820,821,834],{},[458,822,823],{},[461,824,825,828,831],{},[464,826,827],{},"Type",[464,829,830],{},"In the template as",[464,832,833],{},"What the Markdown may write",[471,835,836,850,864,877,901,917,932,950],{},[461,837,838,842,847],{},[476,839,840],{},[215,841,292],{},[476,843,844],{},[215,845,846],{},"string",[476,848,849],{},"Text with merge tags",[461,851,852,856,861],{},[476,853,854],{},[215,855,677],{},[476,857,858],{},[215,859,860],{},"template.URL",[476,862,863],{},"A URL with merge tags. It is evaluated and checked (https, http, mailto or tel), and a merge value cannot move its host",[461,865,866,870,874],{},[476,867,868],{},[215,869,740],{},[476,871,872],{},[215,873,740],{},[476,875,876],{},"A literal integer",[461,878,879,884,889],{},[476,880,881],{},[215,882,883],{},"flag",[476,885,886],{},[215,887,888],{},"bool",[476,890,891,892,895,896,627,898],{},"The bare attribute (",[215,893,894],{},"{wide}","), or ",[215,897,339],{},[215,899,900],{},"false",[461,902,903,908,912],{},[476,904,905],{},[215,906,907],{},"enum",[476,909,910],{},[215,911,846],{},[476,913,914,915],{},"One of ",[215,916,630],{},[461,918,919,924,929],{},[476,920,921],{},[215,922,923],{},"list",[476,925,926],{},[215,927,928],{},"[]string",[476,930,931],{},"A comma-separated literal",[461,933,934,939,944],{},[476,935,936],{},[215,937,938],{},"inline",[476,940,941],{},[215,942,943],{},"kit.Inline",[476,945,946,947],{},"One paragraph of Markdown, merge tags allowed. Render it with ",[215,948,949],{},"{{inline .Attrs.note}}",[461,951,952,957,971],{},[476,953,954],{},[215,955,956],{},"html",[476,958,959,962,963,295,966,962,968],{},[215,960,961],{},"template.HTML"," in ",[215,964,965],{},"html.tmpl",[215,967,846],{},[215,969,970],{},"text.tmpl",[476,972,973,974,977,978],{},"One merge tag naming an ",[215,975,976],{},"lttr.TrustedHTML"," field of typed data: HTML the application rendered. See ",[979,980,982],"a",{"href":981},"#pass-trusted-html","Pass trusted HTML",[405,984,985,994,1008,1033,1045,1054],{},[408,986,987,993],{},[988,989,990],"strong",{},[215,991,992],{},"required: true",": the template must set it.",[408,995,996,1001,1002,1005,1006,416],{},[988,997,998],{},[215,999,1000],{},"required_with: other",": it must be set when ",[215,1003,1004],{},"other"," is. It cannot be combined with ",[215,1007,333],{},[408,1009,1010,1014,1015,295,1017,627,1019,1021,1022,1024,1025,1021,1027,1029,1030,1032],{},[988,1011,1012],{},[215,1013,298],{},": a literal valid for the type (an integer for ",[215,1016,740],{},[215,1018,339],{},[215,1020,900],{}," for ",[215,1023,883],{},", one of the ",[215,1026,630],{},[215,1028,907],{},"). A required attribute has no default, and neither has an ",[215,1031,956],{}," one.",[408,1034,1035,1039,1040,1042,1043,416],{},[988,1036,1037],{},[215,1038,630],{},": the choices of an ",[215,1041,907],{},", and only an ",[215,1044,907],{},[408,1046,1047,1050,1051,416],{},[988,1048,1049],{},"Unset",", an attribute is its default, or else the zero value of its type, so a template can test it with ",[215,1052,1053],{},"{{if .Attrs.href}}",[408,1055,1056,1061,1062,1065,1066,416],{},[988,1057,1058,1059],{},"An optional ",[215,1060,677],{}," that should be unset in some sends needs an explicit empty fallback in the template, ",[215,1063,1064],{},"href=\"{{link |}}\"",". See ",[979,1067,53],{"href":54},[211,1069,1070,1071,1074,1075,1077],{},"Attribute names are identifiers: letters, digits and ",[215,1072,1073],{},"_",", not starting with a digit. Plain's footer takes one ",[215,1076,938],{}," attribute:",[228,1079,1082],{"className":230,"code":1080,"filename":1081,"language":233,"meta":234,"style":234},"# The closing rule, an optional note, the sender's company and address\n# (kit vars company and address; override them with Config.Vars) and, when\n# the recipient has one, an unsubscribe link.\nname: footer\nattrs:\n  note: { type: inline }\ncontent: none\nspacing:\n  top: 8\n  bottom: size.gap\n","plain\u002Fcomponents\u002Ffooter\u002Fcomponent.yaml",[215,1083,1084,1089,1094,1099,1108,1114,1129,1137,1143,1152],{"__ignoreMap":234},[238,1085,1086],{"class":240,"line":241},[238,1087,1088],{"class":244},"# The closing rule, an optional note, the sender's company and address\n",[238,1090,1091],{"class":240,"line":248},[238,1092,1093],{"class":244},"# (kit vars company and address; override them with Config.Vars) and, when\n",[238,1095,1096],{"class":240,"line":254},[238,1097,1098],{"class":244},"# the recipient has one, an unsubscribe link.\n",[238,1100,1101,1103,1105],{"class":240,"line":269},[238,1102,258],{"class":257},[238,1104,262],{"class":261},[238,1106,1107],{"class":265},"footer\n",[238,1109,1110,1112],{"class":240,"line":278},[238,1111,272],{"class":257},[238,1113,275],{"class":261},[238,1115,1116,1119,1121,1123,1125,1127],{"class":240,"line":309},[238,1117,1118],{"class":257},"  note",[238,1120,284],{"class":261},[238,1122,287],{"class":257},[238,1124,262],{"class":261},[238,1126,938],{"class":265},[238,1128,306],{"class":261},[238,1130,1131,1133,1135],{"class":240,"line":317},[238,1132,347],{"class":257},[238,1134,262],{"class":261},[238,1136,352],{"class":265},[238,1138,1139,1141],{"class":240,"line":344},[238,1140,358],{"class":257},[238,1142,275],{"class":261},[238,1144,1145,1147,1149],{"class":240,"line":355},[238,1146,366],{"class":257},[238,1148,262],{"class":261},[238,1150,1151],{"class":338},"8\n",[238,1153,1154,1156,1158],{"class":240,"line":363},[238,1155,377],{"class":257},[238,1157,262],{"class":261},[238,1159,382],{"class":265},[220,1161,1163],{"id":1162},"bind-go-values","Bind Go values",[211,1165,1166,1168,1169,1171,1172,1174,1175,1178,1179,1181,1182,1185,1186,1189],{},[215,1167,312],{}," pass typed Go values from the template's data into the component. Each binding has a ",[215,1170,287],{},", which must be a name in ",[215,1173,79],{},"'s ",[215,1176,1177],{},"types",", and optionally ",[215,1180,992],{},". In Markdown a binding is written ",[215,1183,1184],{},":key=\"path\"",", a path into the template's data, as in ",[215,1187,1188],{},"::invoice{:invoice=\"invoice\"}"," above.",[211,1191,1192,1193,1196,1197,1200,1201,1204,1205,1207],{},"The value must have exactly the registered type: a missing required binding, a value of another type, or untyped ",[215,1194,1195],{},"map[string]any"," data is a compile error. An optional binding the template does not set is ",[215,1198,1199],{},"nil"," in the view, so guard it with ",[215,1202,1203],{},"{{with .Bind.x}}",". ",[979,1206,97],{"href":98}," covers registration and the errors.",[220,1209,1211],{"id":1210},"say-what-content-it-takes","Say what content it takes",[211,1213,1214,1216],{},[215,1215,347],{}," is one of three forms:",[405,1218,1219,1229,1236],{},[408,1220,1221,1225,1226,1228],{},[988,1222,1223],{},[215,1224,553],{},", or no ",[215,1227,347],{}," key: the component takes no Markdown.",[408,1230,1231,1235],{},[988,1232,1233],{},[215,1234,557],{},": paragraphs, headings, lists, action rows and tables.",[408,1237,1238,1241],{},[988,1239,1240],{},"A mapping"," of rules. A count it leaves out is unlimited.",[211,1243,1244],{},"Plain's default component allows images in prose, strikethrough, three heading levels and table headers:",[228,1246,1249],{"className":230,"code":1247,"filename":1248,"language":233,"meta":234,"style":234},"# The default component: loose Markdown outside any ::component lands here.\nname: section\ncontent:\n  allow: [paragraph, heading, list, actions, table, image]\n  inline: [strike]\n  headings: [1, 2, 3]\n  table_header: true\nspacing:\n  top: 0\n  bottom: size.block\n","plain\u002Fcomponents\u002Fsection\u002Fcomponent.yaml",[215,1250,1251,1256,1265,1271,1308,1320,1342,1352,1358,1366],{"__ignoreMap":234},[238,1252,1253],{"class":240,"line":241},[238,1254,1255],{"class":244},"# The default component: loose Markdown outside any ::component lands here.\n",[238,1257,1258,1260,1262],{"class":240,"line":248},[238,1259,258],{"class":257},[238,1261,262],{"class":261},[238,1263,1264],{"class":265},"section\n",[238,1266,1267,1269],{"class":240,"line":254},[238,1268,347],{"class":257},[238,1270,275],{"class":261},[238,1272,1273,1276,1279,1282,1284,1287,1289,1291,1293,1296,1298,1300,1302,1305],{"class":240,"line":269},[238,1274,1275],{"class":257},"  allow",[238,1277,1278],{"class":261},": [",[238,1280,1281],{"class":265},"paragraph",[238,1283,295],{"class":261},[238,1285,1286],{"class":265},"heading",[238,1288,295],{"class":261},[238,1290,923],{"class":265},[238,1292,295],{"class":261},[238,1294,1295],{"class":265},"actions",[238,1297,295],{"class":261},[238,1299,455],{"class":265},[238,1301,295],{"class":261},[238,1303,1304],{"class":265},"image",[238,1306,1307],{"class":261},"]\n",[238,1309,1310,1313,1315,1318],{"class":240,"line":278},[238,1311,1312],{"class":257},"  inline",[238,1314,1278],{"class":261},[238,1316,1317],{"class":265},"strike",[238,1319,1307],{"class":261},[238,1321,1322,1325,1327,1330,1332,1335,1337,1340],{"class":240,"line":309},[238,1323,1324],{"class":257},"  headings",[238,1326,1278],{"class":261},[238,1328,1329],{"class":338},"1",[238,1331,295],{"class":261},[238,1333,1334],{"class":338},"2",[238,1336,295],{"class":261},[238,1338,1339],{"class":338},"3",[238,1341,1307],{"class":261},[238,1343,1344,1347,1349],{"class":240,"line":317},[238,1345,1346],{"class":257},"  table_header",[238,1348,262],{"class":261},[238,1350,1351],{"class":338},"true\n",[238,1353,1354,1356],{"class":240,"line":344},[238,1355,358],{"class":257},[238,1357,275],{"class":261},[238,1359,1360,1362,1364],{"class":240,"line":355},[238,1361,366],{"class":257},[238,1363,262],{"class":261},[238,1365,809],{"class":338},[238,1367,1368,1370,1372],{"class":240,"line":363},[238,1369,377],{"class":257},[238,1371,262],{"class":261},[238,1373,371],{"class":265},[455,1375,1376,1386],{},[458,1377,1378],{},[461,1379,1380,1383],{},[464,1381,1382],{},"Rule",[464,1384,1385],{},"Meaning",[471,1387,1388,1414,1437,1447,1460,1473,1483,1497,1510],{},[461,1389,1390,1395],{},[476,1391,1392],{},[215,1393,1394],{},"allow",[476,1396,1397,1398,295,1400,295,1402,295,1404,295,1406,434,1408,1410,1411,1413],{},"The block kinds allowed: ",[215,1399,1281],{},[215,1401,1286],{},[215,1403,923],{},[215,1405,1295],{},[215,1407,455],{},[215,1409,1304],{},". Without ",[215,1412,1394],{},", the first five. Images are opt-in",[461,1415,1416,1420],{},[476,1417,1418],{},[215,1419,938],{},[476,1421,1422,1423,1425,1426,1429,1430,1425,1433,1436],{},"Opt-in inline features: ",[215,1424,1317],{}," (",[215,1427,1428],{},"~~text~~",") and ",[215,1431,1432],{},"link_title",[215,1434,1435],{},"[text](url \"title\")",")",[461,1438,1439,1444],{},[476,1440,1441],{},[215,1442,1443],{},"headings",[476,1445,1446],{},"The heading levels allowed, 1 to 6. Absent: every level",[461,1448,1449,1457],{},[476,1450,1451,295,1454],{},[215,1452,1453],{},"min_paragraphs",[215,1455,1456],{},"max_paragraphs",[476,1458,1459],{},"How many paragraphs",[461,1461,1462,1470],{},[476,1463,1464,295,1467],{},[215,1465,1466],{},"min",[215,1468,1469],{},"max",[476,1471,1472],{},"How many top-level blocks",[461,1474,1475,1480],{},[476,1476,1477],{},[215,1478,1479],{},"max_columns",[476,1481,1482],{},"The most columns a table may have",[461,1484,1485,1490],{},[476,1486,1487],{},[215,1488,1489],{},"table_header",[476,1491,1492,1493,1496],{},"Treat a table's first row as its header row (",[215,1494,1495],{},"BlockView.Header","). Otherwise it is the first body row",[461,1498,1499,1504],{},[476,1500,1501],{},[215,1502,1503],{},"max_kind",[476,1505,1506,1507],{},"Caps per block kind, such as ",[215,1508,1509],{},"max_kind: { heading: 1 }",[461,1511,1512,1517],{},[476,1513,1514],{},[215,1515,1516],{},"sequence",[476,1518,1519,1520],{},"The exact kinds of the top-level blocks, in order, such as ",[215,1521,1522],{},"sequence: [heading, paragraph]",[211,1524,1525,1526,627,1528,1530,1531,1533],{},"Every kind named in ",[215,1527,1503],{},[215,1529,1516],{}," must be in ",[215,1532,1394],{},". Raw HTML is never allowed, and neither are block quotes.",[220,1535,1537],{"id":1536},"nest-children","Nest children",[211,1539,1540,1542,1543,1546,1547,1550],{},[215,1541,565],{}," lets a component hold one kind of nested component, written with one more colon than its parent. Plain's ",[215,1544,1545],{},"columns"," holds two or three ",[215,1548,1549],{},"column","s:",[228,1552,1555],{"className":230,"code":1553,"filename":1554,"language":233,"meta":234,"style":234},"# Two or three side-by-side columns that stack on phones. Each column is a\n# :::column child holding ordinary Markdown.\nname: columns\ncontent: none\nchildren: { component: column, min: 2, max: 3 }\nspacing:\n  top: 0\n  bottom: size.block\n","plain\u002Fcomponents\u002Fcolumns\u002Fcomponent.yaml",[215,1556,1557,1562,1567,1576,1584,1615,1621,1629],{"__ignoreMap":234},[238,1558,1559],{"class":240,"line":241},[238,1560,1561],{"class":244},"# Two or three side-by-side columns that stack on phones. Each column is a\n",[238,1563,1564],{"class":240,"line":248},[238,1565,1566],{"class":244},"# :::column child holding ordinary Markdown.\n",[238,1568,1569,1571,1573],{"class":240,"line":254},[238,1570,258],{"class":257},[238,1572,262],{"class":261},[238,1574,1575],{"class":265},"columns\n",[238,1577,1578,1580,1582],{"class":240,"line":269},[238,1579,347],{"class":257},[238,1581,262],{"class":261},[238,1583,352],{"class":265},[238,1585,1586,1588,1590,1593,1595,1597,1599,1601,1603,1605,1607,1609,1611,1613],{"class":240,"line":278},[238,1587,565],{"class":257},[238,1589,284],{"class":261},[238,1591,1592],{"class":257},"component",[238,1594,262],{"class":261},[238,1596,1549],{"class":265},[238,1598,295],{"class":261},[238,1600,1466],{"class":257},[238,1602,262],{"class":261},[238,1604,1334],{"class":338},[238,1606,295],{"class":261},[238,1608,1469],{"class":257},[238,1610,262],{"class":261},[238,1612,1339],{"class":338},[238,1614,306],{"class":261},[238,1616,1617,1619],{"class":240,"line":309},[238,1618,358],{"class":257},[238,1620,275],{"class":261},[238,1622,1623,1625,1627],{"class":240,"line":317},[238,1624,366],{"class":257},[238,1626,262],{"class":261},[238,1628,809],{"class":338},[238,1630,1631,1633,1635],{"class":240,"line":344},[238,1632,377],{"class":257},[238,1634,262],{"class":261},[238,1636,371],{"class":265},[405,1638,1639,1670,1677,1693],{},[408,1640,1641,1643,1644,1646,1647,1650,1651,1654,1655,1658,1659,1661,1662,295,1665,1661,1667,1669],{},[215,1642,1592],{}," names the child. The child may declare ",[215,1645,565],{}," of its own, and so on down: a ",[215,1648,1649],{},"::steps"," of ",[215,1652,1653],{},":::step","s, each holding a ",[215,1656,1657],{},"::::tip",". Nesting is bounded only by the parser's 32 levels, and a cycle (",[215,1660,979],{}," holds ",[215,1663,1664],{},"b",[215,1666,1664],{},[215,1668,979],{},") is allowed.",[408,1671,1672,434,1674,1676],{},[215,1673,1466],{},[215,1675,1469],{}," count the children. Absent, they are unlimited.",[408,1678,1679,1680,1682,1683,1686,1687,1689,1690,1692],{},"Any nested component inside it must be its child. With ",[215,1681,429],{},", the default, it holds only its children, and any other Markdown is a compile error (",[215,1684,1685],{},"columns: only component column is allowed here","). A component with both ",[215,1688,565],{}," and a ",[215,1691,347],{}," rule can mix Markdown and children.",[408,1694,1695,1696,1699,1700,1703,1704,1707],{},"Every level is checked against its own schema, and an error inside a child names that child at its own line. From a copy of Plain with a ",[215,1697,1698],{},"steps"," component whose ",[215,1701,1702],{},"step"," children each take at most one ",[215,1705,1706],{},"tip",":",[228,1709,1714],{"className":1710,"code":1712,"filename":1713,"language":292,"meta":234},[1711],"language-text","$ lttr lint -kit .\u002Femailkit templates\u002Fsteps.md\ntemplates\u002Fsteps.md:11:1: tip: at most 1 paragraph, got 2\ntemplates\u002Fsteps.md:17:1: step: only component tip is allowed here\ntemplates\u002Fsteps.md:22:1: step: missing \"title\"\ntemplates\u002Fsteps.md:22:1: step: unknown attribute \"titel\" (did you mean title?)\n","Terminal",[215,1715,1712],{"__ignoreMap":234},[405,1717,1718],{},[408,1719,1720,1721,1724,1725,1065,1728,416],{},"The parent's template reads the children as ",[215,1722,1723],{},".Children",", each with its own attributes, bindings, content, children and spacing, and can render each one with its own template through ",[215,1726,1727],{},"render",[979,1729,1731],{"href":1730},"\u002Fkits\u002Ftemplates-and-views#render-nested-components","Render nested components",[220,1733,982],{"id":1734},"pass-trusted-html",[211,1736,1737,1738,1707],{},"Markdown authors can't write HTML: raw HTML in a template is always a compile error. An application that already has HTML to show (a formatted report, a comment rendered by its own sanitiser) passes it from Go, through an attribute of type ",[215,1739,956],{},[228,1741,1744],{"className":230,"code":1742,"filename":1743,"language":233,"meta":234,"style":234},"# HTML the application rendered (a comment, a formatted report), passed in\n# from Go as an lttr.TrustedHTML.\nname: excerpt\nattrs:\n  body: { type: html, required: true }\ncontent: none\nspacing:\n  top: 0\n  bottom: size.block\n","components\u002Fexcerpt\u002Fcomponent.yaml",[215,1745,1746,1751,1756,1765,1771,1794,1802,1808,1816],{"__ignoreMap":234},[238,1747,1748],{"class":240,"line":241},[238,1749,1750],{"class":244},"# HTML the application rendered (a comment, a formatted report), passed in\n",[238,1752,1753],{"class":240,"line":248},[238,1754,1755],{"class":244},"# from Go as an lttr.TrustedHTML.\n",[238,1757,1758,1760,1762],{"class":240,"line":254},[238,1759,258],{"class":257},[238,1761,262],{"class":261},[238,1763,1764],{"class":265},"excerpt\n",[238,1766,1767,1769],{"class":240,"line":269},[238,1768,272],{"class":257},[238,1770,275],{"class":261},[238,1772,1773,1776,1778,1780,1782,1784,1786,1788,1790,1792],{"class":240,"line":278},[238,1774,1775],{"class":257},"  body",[238,1777,284],{"class":261},[238,1779,287],{"class":257},[238,1781,262],{"class":261},[238,1783,956],{"class":265},[238,1785,295],{"class":261},[238,1787,333],{"class":257},[238,1789,262],{"class":261},[238,1791,339],{"class":338},[238,1793,306],{"class":261},[238,1795,1796,1798,1800],{"class":240,"line":309},[238,1797,347],{"class":257},[238,1799,262],{"class":261},[238,1801,352],{"class":265},[238,1803,1804,1806],{"class":240,"line":317},[238,1805,358],{"class":257},[238,1807,275],{"class":261},[238,1809,1810,1812,1814],{"class":240,"line":344},[238,1811,366],{"class":257},[238,1813,262],{"class":261},[238,1815,809],{"class":338},[238,1817,1818,1820,1822],{"class":240,"line":355},[238,1819,377],{"class":257},[238,1821,262],{"class":261},[238,1823,371],{"class":265},[211,1825,1826,1827,1829],{},"The value comes from a field of type ",[215,1828,976],{}," in the template's data, which carries the HTML and its plain-text alternative:",[228,1831,1836],{"className":1832,"code":1833,"filename":1834,"language":1835,"meta":234,"style":234},"language-go shiki shiki-themes github-light-high-contrast github-light-high-contrast github-dark","type TrustedHTML struct {\n    HTML template.HTML\n    Text string\n}\n","trusted.go","go",[215,1837,1838,1853,1866,1874],{"__ignoreMap":234},[238,1839,1840,1843,1847,1850],{"class":240,"line":241},[238,1841,287],{"class":1842},"s1Q0q",[238,1844,1846],{"class":1845},"sSlKG"," TrustedHTML",[238,1848,1849],{"class":1842}," struct",[238,1851,1852],{"class":261}," {\n",[238,1854,1855,1858,1861,1863],{"class":240,"line":248},[238,1856,1857],{"class":261},"    HTML ",[238,1859,1860],{"class":1845},"template",[238,1862,416],{"class":261},[238,1864,1865],{"class":1845},"HTML\n",[238,1867,1868,1871],{"class":240,"line":254},[238,1869,1870],{"class":261},"    Text ",[238,1872,1873],{"class":1842},"string\n",[238,1875,1876],{"class":240,"line":269},[238,1877,1878],{"class":261},"}\n",[211,1880,1881,1882,1885],{},"A data type with such a field, ",[215,1883,1884],{},"type Digest struct { Summary lttr.TrustedHTML `json:\"summary\"` }",", fills it in Go:",[228,1887,1890],{"className":1832,"code":1888,"filename":1889,"language":1835,"meta":234,"style":234},"d := Digest{Summary: lttr.TrustedHTML{\n    HTML: template.HTML(`\u003Cp style=\"margin:0;\">Three new \u003Cstrong>orders\u003C\u002Fstrong> and one refund.\u003C\u002Fp>`),\n    Text: \"Three new orders and one refund.\",\n}}\n","main.go",[215,1891,1892,1917,1935,1946],{"__ignoreMap":234},[238,1893,1894,1897,1900,1903,1906,1909,1911,1914],{"class":240,"line":241},[238,1895,1896],{"class":261},"d ",[238,1898,1899],{"class":1842},":=",[238,1901,1902],{"class":1845}," Digest",[238,1904,1905],{"class":261},"{Summary: ",[238,1907,1908],{"class":1845},"lttr",[238,1910,416],{"class":261},[238,1912,1913],{"class":1845},"TrustedHTML",[238,1915,1916],{"class":261},"{\n",[238,1918,1919,1922,1926,1929,1932],{"class":240,"line":248},[238,1920,1921],{"class":261},"    HTML: template.",[238,1923,1925],{"class":1924},"sPmw6","HTML",[238,1927,1928],{"class":261},"(",[238,1930,1931],{"class":265},"`\u003Cp style=\"margin:0;\">Three new \u003Cstrong>orders\u003C\u002Fstrong> and one refund.\u003C\u002Fp>`",[238,1933,1934],{"class":261},"),\n",[238,1936,1937,1940,1943],{"class":240,"line":254},[238,1938,1939],{"class":261},"    Text: ",[238,1941,1942],{"class":265},"\"Three new orders and one refund.\"",[238,1944,1945],{"class":261},",\n",[238,1947,1948],{"class":240,"line":269},[238,1949,1950],{"class":261},"}}\n",[211,1952,1953,1954,1957,1958,295,1960,1963,1964,1966,1967,1969,1970,1973],{},"The template names the field with one merge tag and nothing else, ",[215,1955,1956],{},"::excerpt{body=\"{{summary}}\"}",". In ",[215,1959,965],{},[215,1961,1962],{},".Attrs.body"," is the ",[215,1965,961],{},", written as is; in ",[215,1968,970],{}," it is the ",[215,1971,1972],{},"Text"," string:",[228,1975,1979],{"className":1976,"code":1977,"filename":1978,"language":956,"meta":234,"style":234},"language-html shiki shiki-themes github-light-high-contrast github-light-high-contrast github-dark","\u003Ctr>\u003Ctd class=\"pl-px pl-text\" align=\"left\" style=\"padding:{{px .Section.Top}} {{token \"size.side\"}}px {{px .Section.Bottom}};{{style \"font-family\" \"font.sans\"}}font-size:{{token \"size.text\"}}px;line-height:{{token \"size.line\"}}px;{{style \"color\" \"color.text\"}}\">{{.Attrs.body}}\u003C\u002Ftd>\u003C\u002Ftr>\n","components\u002Fexcerpt\u002Fhtml.tmpl",[215,1980,1981],{"__ignoreMap":234},[238,1982,1983,1986,1988,1991,1993,1997,2000,2003,2007,2009,2012,2015,2017,2020,2023,2026,2029,2032,2035,2038,2041,2044,2047,2050,2053,2055,2058,2060],{"class":240,"line":241},[238,1984,1985],{"class":261},"\u003C",[238,1987,461],{"class":257},[238,1989,1990],{"class":261},">\u003C",[238,1992,476],{"class":257},[238,1994,1996],{"class":1995},"sQJpg"," class",[238,1998,1999],{"class":261},"=",[238,2001,2002],{"class":265},"\"pl-px pl-text\"",[238,2004,2006],{"class":2005},"s-oVe"," align",[238,2008,1999],{"class":261},[238,2010,2011],{"class":265},"\"left\"",[238,2013,2014],{"class":1995}," style",[238,2016,1999],{"class":261},[238,2018,2019],{"class":265},"\"padding:{{px .Section.Top}} {{token \"",[238,2021,2022],{"class":1995},"size.side",[238,2024,2025],{"class":2005},"\"}}px",[238,2027,2028],{"class":1995}," {{px",[238,2030,2031],{"class":1995}," .Section.Bottom}};{{style",[238,2033,2034],{"class":2005}," \"font-family\"",[238,2036,2037],{"class":2005}," \"font.sans\"}}font-size:{{token",[238,2039,2040],{"class":2005}," \"size.text\"}}px;line-height:{{token",[238,2042,2043],{"class":2005}," \"size.line\"}}px;{{style",[238,2045,2046],{"class":2005}," \"color\"",[238,2048,2049],{"class":2005}," \"color.text\"}}\"",[238,2051,2052],{"class":261},">{{.Attrs.body}}\u003C\u002F",[238,2054,476],{"class":257},[238,2056,2057],{"class":261},">\u003C\u002F",[238,2059,461],{"class":257},[238,2061,2062],{"class":261},">\n",[211,2064,2065,2068,2069,295,2072,2075,2076,434,2079,2082,2083,2086],{},[988,2066,2067],{},"lttr does not sanitise the HTML."," It is inserted exactly as given, so its safety is your application's responsibility: never build it from user input without sanitising it first. The lint (",[215,2070,2071],{},"lttr lint",[215,2073,2074],{},"lttr kit check",", or ",[215,2077,2078],{},"lint.Lint",[215,2080,2081],{},"lint.Check"," from Go) still runs over the rendered email and reports markup email clients mishandle, such as a ",[215,2084,2085],{},"\u003Cdiv style=\"display:flex\">"," inside it:",[228,2088,2092],{"className":2089,"code":2090,"filename":2091,"language":292,"meta":234},[1711],"css contains \"flex\" at byte 5902\n\u003Cdiv> at byte 5902: style has display:flex\n","Output",[215,2093,2090],{"__ignoreMap":234},[211,2095,2096,2097,2075,2100,2103],{},"The lint is not a sanitiser: it does not catch event handlers such as ",[215,2098,2099],{},"onclick",[215,2101,2102],{},"javascript:"," URLs, in trusted HTML. Sanitise before the value reaches lttr.",[211,2105,2106],{},"Everything else about the value is checked, at compile time with a position unless noted:",[455,2108,2109,2119],{},[458,2110,2111],{},[461,2112,2113,2116],{},[464,2114,2115],{},"Template or data",[464,2117,2118],{},"Error",[471,2120,2121,2138,2151,2164,2177,2190,2203,2216,2232],{},[461,2122,2123,2133],{},[476,2124,2125,2126,2129,2130],{},"A literal value, ",[215,2127,2128],{},"body=\"\u003Cb>Hi\u003C\u002Fb>\"",", or text around the tag, ",[215,2131,2132],{},"body=\"Read: {{summary}}\"",[476,2134,2135],{},[215,2136,2137],{},"excerpt: body: html attribute takes one merge tag, e.g. body=\"{{path}}\"",[461,2139,2140,2146],{},[476,2141,2142,2143],{},"A fallback, ",[215,2144,2145],{},"body=\"{{summary | none}}\"",[476,2147,2148],{},[215,2149,2150],{},"excerpt: body: html attribute takes a merge tag without a fallback, e.g. body=\"{{summary}}\"",[461,2152,2153,2159],{},[476,2154,2155,2156],{},"A field of another type, ",[215,2157,2158],{},"body=\"{{note}}\"",[476,2160,2161],{},[215,2162,2163],{},"excerpt: body: {{note}} is string, want lttr.TrustedHTML",[461,2165,2166,2172],{},[476,2167,2168,2169],{},"A pointer field, ",[215,2170,2171],{},"*lttr.TrustedHTML",[476,2173,2174],{},[215,2175,2176],{},"excerpt: body: {{ptr}} is *lttr.TrustedHTML, want lttr.TrustedHTML",[461,2178,2179,2185],{},[476,2180,2181,2182,2184],{},"Untyped ",[215,2183,1195],{}," data",[476,2186,2187],{},[215,2188,2189],{},"excerpt: body: needs typed data (lttr.TrustedHTML)",[461,2191,2192,2198],{},[476,2193,2194,2195],{},"A misspelt path, ",[215,2196,2197],{},"body=\"{{sumary}}\"",[476,2199,2200],{},[215,2201,2202],{},"unknown name \"sumary\" (did you mean summary?)",[461,2204,2205,2211],{},[476,2206,2207,2208],{},"A merge tag anywhere else that reads into the value, ",[215,2209,2210],{},"{{summary.html}}",[476,2212,2213],{},[215,2214,2215],{},"{{summary.html}} is inside lttr.TrustedHTML; pass it through an html attribute",[461,2217,2218,2227],{},[476,2219,2220,2221,2223,2224,2226],{},"At render, ",[215,2222,1925],{}," set and ",[215,2225,1972],{}," empty",[476,2228,2229],{},[215,2230,2231],{},"excerpt: body: trusted html needs a text version",[461,2233,2234,2242],{},[476,2235,2236,2237,434,2239,2241],{},"At render, a required attribute whose ",[215,2238,1925],{},[215,2240,1972],{}," are both blank",[476,2243,2244],{},[215,2245,2246],{},"excerpt: body: no value for {{summary}}",[211,2248,2249,2250,2252,2253,2255,2256,2258,2259,1425,2261,2264,2265,1425,2267,2270,2271,2273,2274,2276,2277,1425,2279,2282,2283,2286,2287,2290,2291,2293,2294,2296,2297,2299],{},"A value with ",[215,2251,1972],{}," but an empty ",[215,2254,1925],{}," renders its text in the text part only, and nothing in the HTML. An ",[215,2257,956],{}," attribute can't have a ",[215,2260,298],{},[215,2262,2263],{},"attrs.intro: an html attribute has no default","), and a kit frontmatter key can't be of type ",[215,2266,956],{},[215,2268,2269],{},"frontmatter.banner: html is not allowed here","), since both would come from YAML rather than Go. An optional ",[215,2272,956],{}," attribute that isn't given, or a zero ",[215,2275,1913],{},", renders nothing. A merge tag can't reach into a ",[215,2278,1913],{},[215,2280,2281],{},"{{summary}}"," is ",[215,2284,2285],{},"{{summary}} is lttr.TrustedHTML, not a scalar",", and ",[215,2288,2289],{},"{{summary.text}}"," is refused as above): its HTML and text reach an email only through an ",[215,2292,956],{}," attribute, so the two parts always come from the same value. It works the same on a nested child, read inline or through ",[215,2295,1727],{},". Neither shipped kit declares an ",[215,2298,956],{}," attribute.",[220,2301,2303],{"id":2302},"cap-actions-and-set-the-order","Cap actions and set the order",[405,2305,2306,2314,2334],{},[408,2307,2308,2313],{},[988,2309,2310],{},[215,2311,2312],{},"must_follow: [statement]",": the component must come directly after one of the named components.",[408,2315,2316,2321,2322,434,2324,2326,2327,2330,2331,2333],{},[988,2317,2318],{},[215,2319,2320],{},"limits: { button: 1, link: 2 }",": caps the ",[215,2323,591],{},[215,2325,594],{}," inline components inside this component's content. A cap of ",[215,2328,2329],{},"0"," forbids them. ",[215,2332,79],{}," has the same key for the whole template.",[408,2335,2336,2341,2342,2345],{},[988,2337,2338],{},[215,2339,2340],{},"aliases: [t1]",": lets a template write ",[215,2343,2344],{},"::t1"," for the component.",[220,2347,2349],{"id":2348},"space-the-sections","Space the sections",[211,2351,2352,2353,2355],{},"Each component draws its own section, and ",[215,2354,358],{}," decides its top and bottom padding. Plain's button removes the gap between itself and a section or column above it:",[228,2357,2360],{"className":230,"code":2358,"filename":2359,"language":233,"meta":234,"style":234},"# A standalone square button: full width on phones.\nname: button\nattrs:\n  href:  { type: url, required: true }\n  label: { type: text, required: true }\ncontent: none\nspacing:\n  top: 0\n  bottom: size.gap\n  after:\n    section: { top: 0, prev_bottom: 0 }\n    column: { top: 0, prev_bottom: 0 }\n","plain\u002Fcomponents\u002Fbutton\u002Fcomponent.yaml",[215,2361,2362,2367,2376,2382,2405,2428,2436,2442,2450,2458,2465,2490],{"__ignoreMap":234},[238,2363,2364],{"class":240,"line":241},[238,2365,2366],{"class":244},"# A standalone square button: full width on phones.\n",[238,2368,2369,2371,2373],{"class":240,"line":248},[238,2370,258],{"class":257},[238,2372,262],{"class":261},[238,2374,2375],{"class":265},"button\n",[238,2377,2378,2380],{"class":240,"line":254},[238,2379,272],{"class":257},[238,2381,275],{"class":261},[238,2383,2384,2386,2389,2391,2393,2395,2397,2399,2401,2403],{"class":240,"line":269},[238,2385,756],{"class":257},[238,2387,2388],{"class":261},":  { ",[238,2390,287],{"class":257},[238,2392,262],{"class":261},[238,2394,677],{"class":265},[238,2396,295],{"class":261},[238,2398,333],{"class":257},[238,2400,262],{"class":261},[238,2402,339],{"class":338},[238,2404,306],{"class":261},[238,2406,2407,2410,2412,2414,2416,2418,2420,2422,2424,2426],{"class":240,"line":278},[238,2408,2409],{"class":257},"  label",[238,2411,284],{"class":261},[238,2413,287],{"class":257},[238,2415,262],{"class":261},[238,2417,292],{"class":265},[238,2419,295],{"class":261},[238,2421,333],{"class":257},[238,2423,262],{"class":261},[238,2425,339],{"class":338},[238,2427,306],{"class":261},[238,2429,2430,2432,2434],{"class":240,"line":309},[238,2431,347],{"class":257},[238,2433,262],{"class":261},[238,2435,352],{"class":265},[238,2437,2438,2440],{"class":240,"line":317},[238,2439,358],{"class":257},[238,2441,275],{"class":261},[238,2443,2444,2446,2448],{"class":240,"line":344},[238,2445,366],{"class":257},[238,2447,262],{"class":261},[238,2449,809],{"class":338},[238,2451,2452,2454,2456],{"class":240,"line":355},[238,2453,377],{"class":257},[238,2455,262],{"class":261},[238,2457,382],{"class":265},[238,2459,2460,2463],{"class":240,"line":363},[238,2461,2462],{"class":257},"  after",[238,2464,275],{"class":261},[238,2466,2467,2470,2472,2475,2477,2479,2481,2484,2486,2488],{"class":240,"line":374},[238,2468,2469],{"class":257},"    section",[238,2471,284],{"class":261},[238,2473,2474],{"class":257},"top",[238,2476,262],{"class":261},[238,2478,2329],{"class":338},[238,2480,295],{"class":261},[238,2482,2483],{"class":257},"prev_bottom",[238,2485,262],{"class":261},[238,2487,2329],{"class":338},[238,2489,306],{"class":261},[238,2491,2492,2495,2497,2499,2501,2503,2505,2507,2509,2511],{"class":240,"line":770},[238,2493,2494],{"class":257},"    column",[238,2496,284],{"class":261},[238,2498,2474],{"class":257},[238,2500,262],{"class":261},[238,2502,2329],{"class":338},[238,2504,295],{"class":261},[238,2506,2483],{"class":257},[238,2508,262],{"class":261},[238,2510,2329],{"class":338},[238,2512,306],{"class":261},[455,2514,2515,2523],{},[458,2516,2517],{},[461,2518,2519,2521],{},[464,2520,466],{},[464,2522,1385],{},[471,2524,2525,2537,2550,2563],{},[461,2526,2527,2534],{},[476,2528,2529,295,2531],{},[215,2530,2474],{},[215,2532,2533],{},"bottom",[476,2535,2536],{},"The padding, in px or a size token",[461,2538,2539,2544],{},[476,2540,2541],{},[215,2542,2543],{},"first",[476,2545,2546,2549],{},[215,2547,2548],{},"{top, bottom}"," when the component is first in the document",[461,2551,2552,2557],{},[476,2553,2554],{},[215,2555,2556],{},"last",[476,2558,2559,2562],{},[215,2560,2561],{},"{top, bottom, prev_bottom}"," when it is last",[461,2564,2565,2570],{},[476,2566,2567],{},[215,2568,2569],{},"after",[476,2571,2572,2573,262,2575,2577],{},"Per previous component, by name or ",[215,2574,517],{},[215,2576,2561],{}," when this component directly follows it",[211,2579,2580,2582],{},[215,2581,2483],{}," changes the bottom padding of the component before. lttr resolves spacing in three passes, and later passes win:",[2584,2585,2586,2593,2601],"ol",{},[408,2587,2588,2589,434,2591,416],{},"Every component takes its ",[215,2590,2474],{},[215,2592,2533],{},[408,2594,2595,2596,2598,2599,416],{},"In document order, each component applies its ",[215,2597,2569],{}," rule for the component before it: first by that component's name, else by its ",[215,2600,517],{},[408,2602,2603,2604,2606,2607,416],{},"The first component applies ",[215,2605,2543],{},", then the last applies ",[215,2608,2556],{},[211,2610,2611,2612,434,2615,2618,2619,2622],{},"The result reaches the template as ",[215,2613,2614],{},".Section.Top",[215,2616,2617],{},".Section.Bottom",", which Plain writes as the cell padding: ",[215,2620,2621],{},"padding:{{px .Section.Top}} … {{px .Section.Bottom}}",". Children are spaced the same way among their siblings.",[220,2624,2626],{"id":2625},"read-the-errors","Read the errors",[211,2628,2629,2630,2633,2634,2636],{},"A schema problem is a load error, at its position in ",[215,2631,2632],{},"component.yaml",". A template that breaks a schema is a compile error, at its position in the Markdown. These come from ",[215,2635,2071],{}," against Plain:",[228,2638,2641],{"className":2639,"code":2640,"filename":1713,"language":292,"meta":234},[1711],"$ lttr lint -kit plain templates\u002Fwelcome.md\ntemplates\u002Fwelcome.md:7:1: section: h4 is not allowed here\ntemplates\u002Fwelcome.md:9:1: button: missing \"href\"\ntemplates\u002Fwelcome.md:12:1: columns: 2 to 3 column components, got 1\ntemplates\u002Fwelcome.md:18:1: footer: unknown attribute \"colour\"\n",[215,2642,2640],{"__ignoreMap":234},[211,2644,2645,2646,2649,2650,295,2653,2649,2656,1689,2658,2661],{},"And these from a copy of Plain with ",[215,2647,2648],{},"must_follow: [section]"," on ",[215,2651,2652],{},"button",[215,2654,2655],{},"sequence: [heading, paragraph, actions]",[215,2657,1549],{},[215,2659,2660],{},"campaign"," frontmatter key:",[228,2663,2666],{"className":2664,"code":2665,"filename":1713,"language":292,"meta":234},[1711],"$ lttr lint -kit .\u002Femailkit templates\u002Fspring.md\ntemplates\u002Fspring.md:5:1: frontmatter: \"campaign\" must be one of spring, autumn\ntemplates\u002Fspring.md:21:1: column: expected a heading then a paragraph then an action row\ntemplates\u002Fspring.md:26:1: column: expected a heading then a paragraph then an action row\ntemplates\u002Fspring.md:17:1: button must directly follow a section\n",[215,2667,2665],{"__ignoreMap":234},[211,2669,2670,2672],{},[979,2671,63],{"href":64}," lists the messages from the template's side.",[220,2674,2676],{"id":2675},"next-steps","Next steps",[405,2678,2679,2684],{},[408,2680,2681,2683],{},[979,2682,88],{"href":89},": what the component's templates receive.",[408,2685,2686,2688],{},[979,2687,97],{"href":98},": register the types bindings name.",[2690,2691,2692],"style",{},"html pre.shiki code .sBq4M, html code.shiki .sBq4M{--shiki-light:#66707B;--shiki-default:#66707B;--shiki-dark:#6A737D}html pre.shiki code .s71pN, html code.shiki .s71pN{--shiki-light:#024C1A;--shiki-default:#024C1A;--shiki-dark:#85E89D}html pre.shiki code .sihDN, html code.shiki .sihDN{--shiki-light:#0E1116;--shiki-default:#0E1116;--shiki-dark:#E1E4E8}html pre.shiki code .sRBGO, html code.shiki .sRBGO{--shiki-light:#032563;--shiki-default:#032563;--shiki-dark:#9ECBFF}html pre.shiki code .sTl1q, html code.shiki .sTl1q{--shiki-light:#023B95;--shiki-default:#023B95;--shiki-dark:#79B8FF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s1Q0q, html code.shiki .s1Q0q{--shiki-light:#A0111F;--shiki-default:#A0111F;--shiki-dark:#F97583}html pre.shiki code .sSlKG, html code.shiki .sSlKG{--shiki-light:#702C00;--shiki-default:#702C00;--shiki-dark:#B392F0}html pre.shiki code .sPmw6, html code.shiki .sPmw6{--shiki-light:#622CBC;--shiki-default:#622CBC;--shiki-dark:#B392F0}html pre.shiki code .sQJpg, html code.shiki .sQJpg{--shiki-light:#023B95;--shiki-default:#023B95;--shiki-dark:#B392F0}html pre.shiki code .s-oVe, html code.shiki .s-oVe{--shiki-light:#6E011A;--shiki-light-font-style:italic;--shiki-default:#6E011A;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}",{"title":234,"searchDepth":248,"depth":248,"links":2694},[2695,2696,2697,2698,2699,2700,2701,2702,2703,2704,2705],{"id":222,"depth":248,"text":223},{"id":452,"depth":248,"text":453},{"id":612,"depth":248,"text":613},{"id":1162,"depth":248,"text":1163},{"id":1210,"depth":248,"text":1211},{"id":1536,"depth":248,"text":1537},{"id":1734,"depth":248,"text":982},{"id":2302,"depth":248,"text":2303},{"id":2348,"depth":248,"text":2349},{"id":2625,"depth":248,"text":2626},{"id":2675,"depth":248,"text":2676},"component.yaml, key by key — attributes, bindings, content rules, children, ordering, limits and spacing — and the compile errors each rule produces.","md",null,{},{"icon":51},{"title":84,"description":2706},"P4DDGMFFE6fgb0mj3SXLqMQAg8KwbFmVlc11zH_0nMY",[2714,2716],{"title":79,"path":80,"stem":81,"description":2715,"icon":82,"children":-1},"Every key of kit.yaml — name, default component, dark mode, tokens, vars, spans, inline styles, limits, Go types and frontmatter — and how token names resolve.",{"title":88,"path":89,"stem":90,"description":2717,"icon":56,"children":-1},"The kit's templates, the typed view each one executes with, and every core template function, with its signature.",1790467462640]