[{"data":1,"prerenderedAt":784},["ShallowReactive",2],{"navigation_docs":3,"-kits-plain-text":205,"-kits-plain-text-surround":778,"lttr-gallery-plain-02-welcome.txt":783},[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":107,"body":207,"description":771,"extension":772,"links":773,"meta":774,"navigation":775,"path":108,"seo":776,"stem":109,"__hash__":777},"docs\u002F3.kits\u002F8.plain-text.md",{"type":208,"value":209,"toc":758},"minimark",[210,219,230,235,307,310,317,321,324,348,369,373,379,468,475,481,488,497,502,512,517,533,537,540,547,552,559,565,572,576,579,690,697,704,707,714,720,724,735,740,744],[211,212,213,214,218],"p",{},"Every message carries a plain-text part beside the HTML. lttr never strips tags from the HTML to make it. The kit writes it, with ",[215,216,217],"code",{},"text\u002Ftemplate"," files that mirror the HTML ones, so the text part reads as if someone had written it by hand. This is Plain's receipt sample, byte for byte from its golden file (rendered for a recipient with an unsubscribe URL, hence the last line):",[220,221,228],"pre",{"className":222,"code":224,"filename":225,"language":226,"meta":227},[223],"language-text","Example\n\nThanks for your order\n\nOrder EX-1042 was paid on 25 September 2026. Keep this email for your\nrecords.\n\nITEM                             QTY     PRICE\nTeam plan, annual, was $240.00   1     $192.00\nExtra seats                      3      $72.00\nSales tax                               $21.12\nTotal                                  $285.12\n\nBilled to\n\nAda Park, ada@example.com\n\nPayment\n\nVisa ending 4242\n\nDownload invoice:\nhttps:\u002F\u002Fexample.com\u002Finvoices\u002FEX-1042\n\nBilling settings:\nhttps:\u002F\u002Fexample.com\u002Fbilling\n\n--\nQuestions about this charge? Reply to this email.\n\nExample Inc. · 100 Main Street, Springfield\nUnsubscribe: https:\u002F\u002Fexample.com\u002Funsubscribe\n","plain\u002Ftestdata\u002Fgolden\u002Freceipt-free.txt","text","",[215,229,224],{"__ignoreMap":227},[231,232,234],"h2",{"id":233},"know-the-text-templates","Know the text templates",[236,237,238,251],"table",{},[239,240,241],"thead",{},[242,243,244,248],"tr",{},[245,246,247],"th",{},"File",[245,249,250],{},"Role",[252,253,254,283,297],"tbody",{},[242,255,256,262],{},[257,258,259],"td",{},[215,260,261],{},"layout.txt",[257,263,264,265,268,269,272,273,272,276,279,280],{},"The document shell, with ",[215,266,267],{},"kit.TextLayoutView",": ",[215,270,271],{},"Subject",", ",[215,274,275],{},"Preheader",[215,277,278],{},"Body"," and ",[215,281,282],{},"Doc",[242,284,285,290],{},[257,286,287],{},[215,288,289],{},"components\u002F\u003Cname>\u002Ftext.tmpl",[257,291,292,293,296],{},"The component's text form, with the same ",[215,294,295],{},"kit.View"," as its HTML. Optional: a component without one contributes nothing to the text part",[242,298,299,304],{},[257,300,301],{},[215,302,303],{},"blocks.txt",[257,305,306],{},"Optional. Text forms of Markdown blocks, overriding lttr's core forms define by define",[211,308,309],{},"Plain's text layout is the brand name above the body:",[220,311,315],{"className":312,"code":313,"filename":314,"language":226,"meta":227},[223],"{{var \"brand\"}}\n\n{{.Body}}\n","plain\u002Flayout.txt",[215,316,313],{"__ignoreMap":227},[231,318,320],{"id":319},"join-the-parts","Join the parts",[211,322,323],{},"The renderer builds the body from each component's text form, in document order:",[325,326,327,335,338],"ol",{},[328,329,330,331,334],"li",{},"It executes the component's ",[215,332,333],{},"text.tmpl"," (components without one are skipped).",[328,336,337],{},"It trims trailing newlines, and drops a form that is blank.",[328,339,340,341,343,344,347],{},"It joins the rest with one blank line between them, and passes the result to ",[215,342,261],{}," as ",[215,345,346],{},".Body",".",[211,349,350,351,354,355,358,359,361,362,365,366,368],{},"So a component never writes its own gap to the next one, and a text form that renders blank leaves no hole. A nested component's text form is not joined this way: its parent places it, reading the child's content inline as ",[215,352,353],{},"columns"," does below, or calling ",[215,356,357],{},"{{render .}}",", which returns the child's own ",[215,360,333],{}," output with trailing newlines trimmed (",[215,363,364],{},"\"\""," for a child with no ",[215,367,333],{},").",[231,370,372],{"id":371},"render-markdown-as-text","Render Markdown as text",[211,374,375,378],{},[215,376,377],{},"{{content .Content}}"," in a text template renders each block through the text defines. lttr's core defines give every block a sensible text form:",[236,380,381,391],{},[239,382,383],{},[242,384,385,388],{},[245,386,387],{},"Block",[245,389,390],{},"Core text form",[252,392,393,406,423,433,446,458],{},[242,394,395,403],{},[257,396,397,272,400],{},[215,398,399],{},"paragraph",[215,401,402],{},"heading",[257,404,405],{},"The text, wrapped at 70 characters",[242,407,408,413],{},[257,409,410],{},[215,411,412],{},"list",[257,414,415,416,419,420],{},"One line per item, ",[215,417,418],{},"- item"," or ",[215,421,422],{},"1. item",[242,424,425,430],{},[257,426,427],{},[215,428,429],{},"actions",[257,431,432],{},"Each action as its label, a colon, and the URL on the next line, with a blank line between actions",[242,434,435,439],{},[257,436,437],{},[215,438,236],{},[257,440,441,442,445],{},"Dot leaders for two columns, padded columns otherwise. A header row (with ",[215,443,444],{},"table_header",") is written in capitals",[242,447,448,453],{},[257,449,450],{},[215,451,452],{},"image",[257,454,455],{},[215,456,457],{},"[alt] src",[242,459,460,465],{},[257,461,462],{},[215,463,464],{},"inline",[257,466,467],{},"The text",[211,469,470,471,474],{},"Inline Markdown gives its text: bold, italic, strikethrough and spans contribute their words, and code its value. A link in prose becomes ",[215,472,473],{},"label (url)",", or just the URL when the label is empty or is the URL itself.",[211,476,477,478,480],{},"A kit's ",[215,479,303],{}," replaces any of these, define by define. Plain replaces two: an H1 in capitals, and an image with its alt text in brackets:",[220,482,486],{"className":483,"code":484,"filename":485,"language":226,"meta":227},[223],"{{\u002F* Text forms of Markdown blocks. Defines left out here (paragraph,\nlist, actions, action, table, inline) use lttr's core text forms. content\njoins block outputs verbatim, so each define ends all but the last block\nwith a blank line. *\u002F}}\n\n{{define \"heading\"}}{{if eq .Level 1}}{{upper .Text}}{{else}}{{wrap .Text}}{{end}}{{if not .Last}}{{\"\\n\\n\"}}{{end}}{{end}}\n\n{{define \"image\"}}[{{.Alt}}] {{.Src}}{{if not .Last}}{{\"\\n\\n\"}}{{end}}{{end}}\n","plain\u002Fblocks.txt",[215,487,484],{"__ignoreMap":227},[211,489,490,491,493,494,347],{},"A define in ",[215,492,303],{}," whose body is only whitespace and comments does not replace the core one. To render nothing, write ",[215,495,496],{},"{{\"\"}}",[498,499,501],"h3",{"id":500},"end-every-block-but-the-last","End every block but the last",[211,503,504,507,508,511],{},[215,505,506],{},"content"," joins the block outputs verbatim, so each define writes its own separator. The core defines, and Plain's, end every block but the last with a blank line, using ",[215,509,510],{},".Last",":",[211,513,514],{},[215,515,516],{},"{{if not .Last}}{{\"\\n\\n\"}}{{end}}",[211,518,519,522,523,272,526,279,529,532],{},[215,520,521],{},"BlockView"," also has ",[215,524,525],{},".Index",[215,527,528],{},".First",[215,530,531],{},".Prev"," (the previous block's kind), for kits that space blocks differently, such as a heading followed by a paragraph with no gap.",[231,534,536],{"id":535},"write-a-components-text-form","Write a component's text form",[211,538,539],{},"Plain's text forms show three common shapes. The section renders its content:",[220,541,545],{"className":542,"code":543,"filename":544,"language":226,"meta":227},[223],"{{content .Content}}\n","plain\u002Fcomponents\u002Fsection\u002Ftext.tmpl",[215,546,543],{"__ignoreMap":227},[211,548,549,551],{},[215,550,353],{}," renders each child in turn, with a blank line between them:",[220,553,557],{"className":554,"code":555,"filename":556,"language":226,"meta":227},[223],"{{range $i, $c := .Children}}{{if $i}}\n\n{{end}}{{content $c.Content}}{{end}}\n","plain\u002Fcomponents\u002Fcolumns\u002Ftext.tmpl",[215,558,555],{"__ignoreMap":227},[211,560,561,562,564],{},"The footer writes a rule, the optional note (an ",[215,563,464],{}," attribute, rendered as text and wrapped), the address from kit vars and the unsubscribe URL when the recipient has one:",[220,566,570],{"className":567,"code":568,"filename":569,"language":226,"meta":227},[223],"--\n{{if .Attrs.note}}{{wrap (inline .Attrs.note)}}\n\n{{end}}{{var \"company\"}} · {{var \"address\"}}{{with .Doc.Recipient.UnsubscribeURL}}\nUnsubscribe: {{.}}{{end}}\n","plain\u002Fcomponents\u002Ffooter\u002Ftext.tmpl",[215,571,568],{"__ignoreMap":227},[231,573,575],{"id":574},"wrap-and-align-with-the-text-helpers","Wrap and align with the text helpers",[211,577,578],{},"Text templates get helpers for the layouts plain text needs:",[236,580,581,591],{},[239,582,583],{},[242,584,585,588],{},[245,586,587],{},"Function",[245,589,590],{},"What it does",[252,592,593,610,628,638,652,680],{},[242,594,595,600],{},[257,596,597],{},[215,598,599],{},"wrap s",[257,601,602,603,606,607,609],{},"Wraps ",[215,604,605],{},"s"," at 70 characters on spaces. Newlines in ",[215,608,605],{}," are kept, blank lines dropped and runs of spaces collapsed. A word longer than a line, such as a URL, sits on its own line unbroken",[242,611,612,617],{},[257,613,614],{},[215,615,616],{},"leaders rows…",[257,618,619,620,623,624,627],{},"Renders ",[215,621,622],{},"leader"," rows as ",[215,625,626],{},"label ..... value",", each value starting in one column: 5 past the longest label, clamped to columns 34 to 50 (counting from 0). A label too long for that column still gets 3 dots",[242,629,630,635],{},[257,631,632],{},[215,633,634],{},"leader label value [sub]",[257,636,637],{},"Builds one row. A sub-value sits on the next line, right-aligned to the end of the value",[242,639,640,645],{},[257,641,642],{},[215,643,644],{},"columns header rows right",[257,646,647,648,651],{},"Renders padded columns 3 spaces apart, each as wide as its widest cell. ",[215,649,650],{},"right"," right-aligns columns. The header row, when not nil, is written as given",[242,653,654,665],{},[257,655,656,272,659,272,662],{},[215,657,658],{},"cells",[215,660,661],{},"rows",[215,663,664],{},"bools",[257,666,667,668,272,671,279,674,677,678],{},"Build the ",[215,669,670],{},"[]string",[215,672,673],{},"[][]string",[215,675,676],{},"[]bool"," arguments of ",[215,679,353],{},[242,681,682,687],{},[257,683,684],{},[215,685,686],{},"upper s",[257,688,689],{},"Capitals, for labels and headings",[211,691,692,693,696],{},"The tutorial's invoice uses ",[215,694,695],{},"leaders"," with one row per line of the invoice:",[220,698,702],{"className":699,"code":700,"filename":701,"language":226,"meta":227},[223],"{{- \u002F* The invoice as dot leaders. leaders lines its rows up in one\ncolumn; each row here is its own call, since a template cannot collect\nrows in a loop, and short labels share the same column anyway. *\u002F -}}\n{{upper .Attrs.title}} {{.Bind.invoice.Number}}\n\n{{range .Bind.invoice.Lines -}}\n{{leaders (leader (printf \"%s x%d\" .Name .Qty) .Amount.String)}}\n{{end -}}\n{{leaders (leader \"Total\" .Bind.invoice.Total.String)}}\n","tutorial\u002Fkit\u002Fcomponents\u002Finvoice\u002Ftext.tmpl",[215,703,700],{"__ignoreMap":227},[211,705,706],{},"It renders this block of the text part:",[220,708,712],{"className":709,"code":710,"filename":711,"language":226,"meta":227},[223],"INVOICE INV-0042\n\nTeam plan, September x1 ......... $49.00\nExtra seats x3 .................. $27.00\nTotal ........................... $76.00\n","tutorial\u002Ftestdata\u002Finvoice.txt#L7-L11",[215,713,710],{"__ignoreMap":227},[211,715,716,717,719],{},"Each row is its own ",[215,718,695],{}," call, because a template cannot collect rows in a loop. The values still line up: a label of at most 29 characters always puts its value in column 34.",[231,721,723],{"id":722},"check-the-text-part","Check the text part",[211,725,726,727,730,731,734],{},"The text part is rendered and checked with the HTML. A merge tag with no value or a bad URL is a render error in both. Compare it byte for byte in a golden test, as Plain and the tutorial do with ",[215,728,729],{},"lint.Golden"," and their ",[215,732,733],{},"testdata"," files. The previews show it in the Text tab:",[736,737],"email-preview",{"kit":738,"name":739,"tab":226},"plain","02-welcome",[231,741,743],{"id":742},"next-steps","Next steps",[745,746,747,753],"ul",{},[328,748,749,752],{},[750,751,88],"a",{"href":89},": the text functions' signatures.",[328,754,755,757],{},[750,756,159],{"href":160},": golden files for both parts.",{"title":227,"searchDepth":759,"depth":759,"links":760},2,[761,762,763,767,768,769,770],{"id":233,"depth":759,"text":234},{"id":319,"depth":759,"text":320},{"id":371,"depth":759,"text":372,"children":764},[765],{"id":500,"depth":766,"text":501},3,{"id":535,"depth":759,"text":536},{"id":574,"depth":759,"text":575},{"id":722,"depth":759,"text":723},{"id":742,"depth":759,"text":743},"How a kit writes the plain-text part — text templates, the core block forms and blocks.txt, separators, the wrapping and table helpers, and how the parts are joined.","md",null,{},{"icon":110},{"title":107,"description":771},"ha7IzvIk7v6hA0DJQCLLG8Qq9bsqqjCofds3zhkvxMY",[779,781],{"title":102,"path":103,"stem":104,"description":780,"icon":105,"children":-1},"The rules a kit's HTML must follow to survive mail clients, the lint that enforces them, the Outlook helpers, and how Plain handles dark mode.",{"title":118,"path":119,"stem":120,"description":782,"icon":121,"children":-1},"Define sender profiles, fill a Config, and let NewRenderer check everything at once — then route a rendered Message yourself.","Example\n\nWELCOME, ADA\n\nYour workspace Northwind Studio is ready. Most teams start with these\nthree steps:\n\n1. Invite your teammates\n2. Connect a calendar\n3. Pick a plan before 9 October\n\nFinish setting up:\nhttps:\u002F\u002Fexample.com\u002Fsetup\n\n[An empty workspace waiting for its first project]\nYour workspace, before the first project.\n\nGuides\n\nShort walkthroughs for every feature, most under five minutes.\n\nRead the guides:\nhttps:\u002F\u002Fexample.com\u002Fguides\n\nHelp\n\nStuck on something? Reply to this email and a person will answer.\n\nVisit the help centre:\nhttps:\u002F\u002Fexample.com\u002Fhelp\n\n--\nYou are receiving this because you created an account at Example.\nEmail settings (https:\u002F\u002Fexample.com\u002Fsettings)\n\nExample Inc. · 100 Main Street, Springfield\nUnsubscribe: https:\u002F\u002Fexample.com\u002Funsubscribe\n",1790467458233]