[{"data":1,"prerenderedAt":323},["ShallowReactive",2],{"navigation":3,"\u002Fguide\u002Ftemplates":57},[4,22,35,44],{"title":5,"path":6,"stem":7,"children":8,"page":21},"Getting Started","\u002Fgetting-started","1.getting-started",[9,13,17],{"title":10,"path":11,"stem":12},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction",{"title":14,"path":15,"stem":16},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation",{"title":18,"path":19,"stem":20},"Quickstart","\u002Fgetting-started\u002Fquickstart","1.getting-started\u002F3.quickstart",false,{"title":23,"path":24,"stem":25,"children":26,"page":21},"Guide","\u002Fguide","2.guide",[27,31],{"title":28,"path":29,"stem":30},"Writing a template","\u002Fguide\u002Ftemplates","2.guide\u002F1.templates",{"title":32,"path":33,"stem":34},"The terox.json manifest","\u002Fguide\u002Fmanifest","2.guide\u002F2.manifest",{"title":36,"path":37,"stem":38,"children":39,"page":21},"Reference","\u002Freference","3.reference",[40],{"title":41,"path":42,"stem":43},"CLI reference","\u002Freference\u002Fcli","3.reference\u002F1.cli",{"title":45,"path":46,"stem":47,"children":48,"page":21},"About","\u002Fabout","4.about",[49,53],{"title":50,"path":51,"stem":52},"How Terox fits next to other tools","\u002Fabout\u002Fcomparison","4.about\u002F1.comparison",{"title":54,"path":55,"stem":56},"Status & roadmap","\u002Fabout\u002Fstatus","4.about\u002F2.status",{"id":58,"title":28,"body":59,"description":318,"extension":319,"meta":320,"navigation":165,"path":29,"seo":321,"stem":30,"__hash__":322},"docs\u002F2.guide\u002F1.templates.md",{"type":60,"value":61,"toc":310},"minimark",[62,71,76,79,89,96,102,134,138,145,184,204,208,211,217,232,240,250,274,277,293,296,300,306],[63,64,65,66,70],"p",{},"A Terox template is just a directory. It can live on your machine, in a\nGitHub repository, or both. The only file Terox treats specially is\n",[67,68,69],"code",{},"terox.json"," at the root, which declares the variables your template needs.",[72,73,75],"h2",{"id":74},"anatomy","Anatomy",[63,77,78],{},"A minimal template:",[80,81,86],"pre",{"className":82,"code":84,"language":85},[83],"language-text","my-template\u002F\n├── terox.json\n└── {{.project_name}}\u002F\n    ├── README.md\n    └── .gitignore\n","text",[67,87,84],{"__ignoreMap":88},"",[63,90,91,92,95],{},"When scaffolded with ",[67,93,94],{},"project_name=portfolio",", the output is:",[80,97,100],{"className":98,"code":99,"language":85},[83],"output\u002F\n└── portfolio\u002F\n    ├── README.md\n    └── .gitignore\n",[67,101,99],{"__ignoreMap":88},[103,104,105,117,128,131],"ul",{},[106,107,108,109,111,112,116],"li",{},"The manifest ",[67,110,69],{}," is consumed by Terox and is ",[113,114,115],"strong",{},"not"," copied into\nthe output.",[106,118,119,120,123,124,127],{},"Directory and file names are rendered as Go templates. The directory\n",[67,121,122],{},"{{.project_name}}\u002F"," becomes ",[67,125,126],{},"portfolio\u002F",".",[106,129,130],{},"Text file contents are rendered the same way.",[106,132,133],{},"Binary files (detected by content sniffing) are copied byte-for-byte and\nare never run through the template engine.",[72,135,137],{"id":136},"variable-syntax","Variable syntax",[63,139,140,141,144],{},"Variables are referenced using standard Go ",[67,142,143],{},"text\u002Ftemplate"," syntax:",[80,146,150],{"className":147,"code":148,"language":149,"meta":88,"style":88},"language-markdown shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# {{.project_name}}\n\nBy {{.author}}\n\nLicensed under {{.license}}.\n","markdown",[67,151,152,160,167,173,178],{"__ignoreMap":88},[153,154,157],"span",{"class":155,"line":156},"line",1,[153,158,159],{},"# {{.project_name}}\n",[153,161,163],{"class":155,"line":162},2,[153,164,166],{"emptyLinePlaceholder":165},true,"\n",[153,168,170],{"class":155,"line":169},3,[153,171,172],{},"By {{.author}}\n",[153,174,176],{"class":155,"line":175},4,[153,177,166],{"emptyLinePlaceholder":165},[153,179,181],{"class":155,"line":180},5,[153,182,183],{},"Licensed under {{.license}}.\n",[63,185,186,187,190,191,190,194,197,198,201,202,127],{},"The keys you reference (",[67,188,189],{},"project_name",", ",[67,192,193],{},"author",[67,195,196],{},"license",") must match the\n",[67,199,200],{},"name"," field of the corresponding entries in ",[67,203,69],{},[72,205,207],{"id":206},"conditional-file-paths","Conditional file paths",[63,209,210],{},"If a rendered file or directory name evaluates to an empty string, the file\nis skipped entirely. This lets you conditionally include files by gating\nthem on a variable.",[80,212,215],{"className":213,"code":214,"language":85},[83],"{{if eq .use_typescript \"true\"}}tsconfig.json{{end}}\n",[67,216,214],{"__ignoreMap":88},[63,218,219,220,223,224,227,228,231],{},"When ",[67,221,222],{},"use_typescript"," is ",[67,225,226],{},"\"true\"",", the file is written as ",[67,229,230],{},"tsconfig.json",".\nWhen it is anything else, the rendered name is empty and the file is\nskipped.",[72,233,235,236,239],{"id":234},"files-that-contain-natively","Files that contain ",[67,237,238],{},"{{ }}"," natively",[63,241,242,243,245,246,249],{},"Some file formats use ",[67,244,238],{}," syntax for their own purposes — Vue\ninterpolations, GitHub Actions ",[67,247,248],{},"${{ ... }}"," expressions, Helm charts. If\nyour template contains such files, escape the braces using Go template's\nown escape:",[80,251,255],{"className":252,"code":253,"language":254,"meta":88,"style":88},"language-yaml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","- run: echo {{\"${{\"}} github.sha {{\"}}\"}}\n","yaml",[67,256,257],{"__ignoreMap":88},[153,258,259,263,267,270],{"class":155,"line":156},[153,260,262],{"class":261},"sMK4o","-",[153,264,266],{"class":265},"swJcz"," run",[153,268,269],{"class":261},":",[153,271,273],{"class":272},"sfazB"," echo {{\"${{\"}} github.sha {{\"}}\"}}\n",[63,275,276],{},"This renders to:",[80,278,280],{"className":252,"code":279,"language":254,"meta":88,"style":88},"- run: echo ${{ github.sha }}\n",[67,281,282],{"__ignoreMap":88},[153,283,284,286,288,290],{"class":155,"line":156},[153,285,262],{"class":261},[153,287,266],{"class":265},[153,289,269],{"class":261},[153,291,292],{"class":272}," echo ${{ github.sha }}\n",[63,294,295],{},"A future release will add a \"copy without rendering\" list so this dance\nbecomes optional.",[72,297,299],{"id":298},"templates-without-a-manifest","Templates without a manifest",[63,301,302,303,305],{},"You do not have to write a ",[67,304,69],{}," at all. Any directory or public\nGitHub repository can be scaffolded — Terox will copy the files as-is. This\nis useful for snapshotting a repository without its git history, or for\nturning an existing codebase into a \"template\" before you have time to add\nvariables.",[307,308,309],"style",{},"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 .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}",{"title":88,"searchDepth":156,"depth":162,"links":311},[312,313,314,315,317],{"id":74,"depth":162,"text":75},{"id":136,"depth":162,"text":137},{"id":206,"depth":162,"text":207},{"id":234,"depth":162,"text":316},"Files that contain {{ }} natively",{"id":298,"depth":162,"text":299},"How to structure a Terox template, write the manifest, and reference variables.","md",{},{"title":28,"description":318},"S-N2j5RowNXwi0sWPIj7Jk5k0gLYglehFfthQ-NBFEM",1779617132669]