[{"data":1,"prerenderedAt":1839},["ShallowReactive",2],{"navigation_docs":3,"-docs-templates-template-rendering":145,"-docs-templates-template-rendering-surround":1834},[4,8,12,16,51,81,103],{"title":5,"path":6,"stem":7},"Introduction","\u002Fdocs\u002Fintroduction","docs\u002F1.introduction",{"title":9,"path":10,"stem":11},"Getting started","\u002Fdocs\u002Fgetting-started","docs\u002F2.getting-started",{"title":13,"path":14,"stem":15},"Environment variables","\u002Fdocs\u002Fenvironment-variables","docs\u002F3.environment-variables",{"title":17,"icon":18,"path":19,"stem":20,"children":21,"page":50},"Guide","i-lucide-book-open","\u002Fdocs\u002Fguide","docs\u002F4.guide",[22,26,30,34,38,42,46],{"title":23,"path":24,"stem":25},"Scaffold a project","\u002Fdocs\u002Fguide\u002Fscaffold","docs\u002F4.guide\u002F1.scaffold",{"title":27,"path":28,"stem":29},"Pin and manage templates","\u002Fdocs\u002Fguide\u002Fpin","docs\u002F4.guide\u002F2.pin",{"title":31,"path":32,"stem":33},"Update pinned templates","\u002Fdocs\u002Fguide\u002Fupdating","docs\u002F4.guide\u002F3.updating",{"title":35,"path":36,"stem":37},"Find templates","\u002Fdocs\u002Fguide\u002Fsearch","docs\u002F4.guide\u002F4.search",{"title":39,"path":40,"stem":41},"Manage registries","\u002Fdocs\u002Fguide\u002Fregistry","docs\u002F4.guide\u002F5.registry",{"title":43,"path":44,"stem":45},"Troubleshooting","\u002Fdocs\u002Fguide\u002Ftroubleshooting","docs\u002F4.guide\u002F6.troubleshooting",{"title":47,"path":48,"stem":49},"Build your first template","\u002Fdocs\u002Fguide\u002Fcreate-template","docs\u002F4.guide\u002F7.create-template",false,{"title":52,"icon":53,"path":54,"stem":55,"children":56,"page":50},"Templates","i-lucide-layout-template","\u002Fdocs\u002Ftemplates","docs\u002F5.templates",[57,61,65,69,73,77],{"title":58,"path":59,"stem":60},"Template anatomy","\u002Fdocs\u002Ftemplates\u002Fanatomy","docs\u002F5.templates\u002F1.anatomy",{"title":62,"path":63,"stem":64},"Template params","\u002Fdocs\u002Ftemplates\u002Fparams","docs\u002F5.templates\u002F2.params",{"title":66,"path":67,"stem":68},"Template rendering","\u002Fdocs\u002Ftemplates\u002Ftemplate-rendering","docs\u002F5.templates\u002F3.template-rendering",{"title":70,"path":71,"stem":72},"Hooks","\u002Fdocs\u002Ftemplates\u002Fhooks","docs\u002F5.templates\u002F4.hooks",{"title":74,"path":75,"stem":76},"Publish a template","\u002Fdocs\u002Ftemplates\u002Fpublish","docs\u002F5.templates\u002F5.publish",{"title":78,"path":79,"stem":80},"spin.toml","\u002Fdocs\u002Ftemplates\u002Fspin-toml","docs\u002F5.templates\u002F6.spin-toml",{"title":82,"icon":83,"path":84,"stem":85,"children":86,"page":50},"Registries","i-lucide-database","\u002Fdocs\u002Fregistries","docs\u002F6.registries",[87,91,95,99],{"title":88,"path":89,"stem":90},"Registry anatomy","\u002Fdocs\u002Fregistries\u002Fanatomy","docs\u002F6.registries\u002F1.anatomy",{"title":92,"path":93,"stem":94},"Template metadata file","\u002Fdocs\u002Fregistries\u002Ftemplate-metadata","docs\u002F6.registries\u002F2.template-metadata",{"title":96,"path":97,"stem":98},"Run a registry","\u002Fdocs\u002Fregistries\u002Frun","docs\u002F6.registries\u002F3.run",{"title":100,"path":101,"stem":102},"registry.toml","\u002Fdocs\u002Fregistries\u002Fregistry-toml","docs\u002F6.registries\u002F4.registry-toml",{"title":104,"icon":105,"path":106,"stem":107,"children":108,"page":50},"Commands","i-lucide-terminal","\u002Fdocs\u002Fcommands","docs\u002F7.commands",[109,113,117,121,125,129,133,137,141],{"title":110,"path":111,"stem":112},"spin new","\u002Fdocs\u002Fcommands\u002Fnew","docs\u002F7.commands\u002F1.new",{"title":114,"path":115,"stem":116},"spin add","\u002Fdocs\u002Fcommands\u002Fadd","docs\u002F7.commands\u002F2.add",{"title":118,"path":119,"stem":120},"spin list","\u002Fdocs\u002Fcommands\u002Flist","docs\u002F7.commands\u002F3.list",{"title":122,"path":123,"stem":124},"spin update","\u002Fdocs\u002Fcommands\u002Fupdate","docs\u002F7.commands\u002F4.update",{"title":126,"path":127,"stem":128},"spin remove","\u002Fdocs\u002Fcommands\u002Fremove","docs\u002F7.commands\u002F5.remove",{"title":130,"path":131,"stem":132},"spin search","\u002Fdocs\u002Fcommands\u002Fsearch","docs\u002F7.commands\u002F6.search",{"title":134,"path":135,"stem":136},"spin registry","\u002Fdocs\u002Fcommands\u002Fregistry","docs\u002F7.commands\u002F7.registry",{"title":138,"path":139,"stem":140},"spin init","\u002Fdocs\u002Fcommands\u002Finit","docs\u002F7.commands\u002F8.init",{"title":142,"path":143,"stem":144},"spin version","\u002Fdocs\u002Fcommands\u002Fversion","docs\u002F7.commands\u002F9.version",{"id":146,"title":66,"body":147,"description":1828,"extension":1829,"links":1830,"meta":1831,"navigation":213,"path":67,"seo":1832,"stem":68,"__hash__":1833},"docs\u002Fdocs\u002F5.templates\u002F3.template-rendering.md",{"type":148,"value":149,"toc":1806},"minimark",[150,159,171,306,310,320,325,347,350,403,407,463,481,484,519,523,576,590,594,630,633,637,675,680,684,740,754,758,776,780,1038,1042,1048,1052,1062,1099,1110,1114,1120,1124,1141,1200,1203,1214,1217,1221,1316,1320,1338,1496,1510,1514,1522,1566,1572,1587,1596,1710,1719,1748,1754,1773,1782,1802],[151,152,154,158],"h2",{"id":153},"tmpl-files",[155,156,157],"code",{},".tmpl"," files",[160,161,162,163,166,167,170],"p",{},"A file named ",[155,164,165],{},"README.md.tmpl"," is rendered as ",[155,168,169],{},"README.md",". The resolved param values are passed to the template engine as a map.",[172,173,178],"pre",{"className":174,"code":175,"language":176,"meta":177,"style":177},"language-templ shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# {{ .project_name | title }}\n\n{{ .description }}\n\n- License: {{ .license }}\n- Port: {{ .port }}\n- Features: {{ join .features \", \" }}\n","templ","",[155,179,180,208,215,227,232,254,273],{"__ignoreMap":177},[181,182,185,189,193,196,199,202,205],"span",{"class":183,"line":184},"line",1,[181,186,188],{"class":187},"sTEyZ","# ",[181,190,192],{"class":191},"sMK4o","{{",[181,194,195],{"class":191}," .",[181,197,198],{"class":187},"project_name ",[181,200,201],{"class":191},"|",[181,203,204],{"class":187}," title ",[181,206,207],{"class":191},"}}\n",[181,209,211],{"class":183,"line":210},2,[181,212,214],{"emptyLinePlaceholder":213},true,"\n",[181,216,218,220,222,225],{"class":183,"line":217},3,[181,219,192],{"class":191},[181,221,195],{"class":191},[181,223,224],{"class":187},"description ",[181,226,207],{"class":191},[181,228,230],{"class":183,"line":229},4,[181,231,214],{"emptyLinePlaceholder":213},[181,233,235,238,241,244,247,249,252],{"class":183,"line":234},5,[181,236,237],{"class":191},"-",[181,239,240],{"class":187}," License",[181,242,243],{"class":191},":",[181,245,246],{"class":191}," {{",[181,248,195],{"class":191},[181,250,251],{"class":187},"license ",[181,253,207],{"class":191},[181,255,257,259,262,264,266,268,271],{"class":183,"line":256},6,[181,258,237],{"class":191},[181,260,261],{"class":187}," Port",[181,263,243],{"class":191},[181,265,246],{"class":191},[181,267,195],{"class":191},[181,269,270],{"class":187},"port ",[181,272,207],{"class":191},[181,274,276,278,281,283,285,288,291,294,297,301,303],{"class":183,"line":275},7,[181,277,237],{"class":191},[181,279,280],{"class":187}," Features",[181,282,243],{"class":191},[181,284,246],{"class":191},[181,286,287],{"class":187}," join ",[181,289,290],{"class":191},".",[181,292,293],{"class":187},"features ",[181,295,296],{"class":191},"\"",[181,298,300],{"class":299},"sfazB",", ",[181,302,296],{"class":191},[181,304,305],{"class":191}," }}\n",[151,307,309],{"id":308},"template-language-basics","Template language basics",[160,311,312,315,316,319],{},[155,313,314],{},"_base\u002F*.tmpl"," files use Go's ",[155,317,318],{},"text\u002Ftemplate",". Here is what you can write:",[321,322,324],"h3",{"id":323},"conditions","Conditions",[160,326,327,331,332,335,336,339,340,343,344],{},[328,329],"binding",{"value":330},"if eq .license \"MIT\"","\nLicensed under MIT\n",[328,333],{"value":334},"else if eq .license \"Apache-2.0\"","\nLicensed under Apache 2.0\n",[328,337],{"value":338},"else if eq .license \"None\"","\nNo license file generated\n",[328,341],{"value":342},"else","\nProprietary (no license file)\n",[328,345],{"value":346},"end",[160,348,349],{},"License values in templates can be:",[351,352,353,397],"ul",{},[354,355,356,357,300,360,300,363,300,366,300,369,300,372,300,375,300,378,300,381,300,384,300,387,300,390,300,393,396],"li",{},"A SPDX identifier: ",[155,358,359],{},"MIT",[155,361,362],{},"Apache-2.0",[155,364,365],{},"BSD-3-Clause",[155,367,368],{},"BSD-2-Clause",[155,370,371],{},"ISC",[155,373,374],{},"0BSD",[155,376,377],{},"Unlicense",[155,379,380],{},"CC0-1.0",[155,382,383],{},"MPL-2.0",[155,385,386],{},"GPL-2.0-only",[155,388,389],{},"GPL-3.0-only",[155,391,392],{},"AGPL-3.0-only",[155,394,395],{},"LGPL-3.0-only",", etc.",[354,398,399,402],{},[155,400,401],{},"None"," — no LICENSE file generated at all",[321,404,406],{"id":405},"loops","Loops",[172,408,410],{"className":174,"code":409,"language":176,"meta":177,"style":177},"{{ range $index, $item := .features }}\n{{ $index }}: {{ $item }}\n{{ end }}\n",[155,411,412,438,454],{"__ignoreMap":177},[181,413,414,416,420,423,426,429,432,434,436],{"class":183,"line":184},[181,415,192],{"class":191},[181,417,419],{"class":418},"s7zQu"," range",[181,421,422],{"class":187}," $index",[181,424,425],{"class":191},",",[181,427,428],{"class":187}," $item ",[181,430,431],{"class":191},":=",[181,433,195],{"class":191},[181,435,293],{"class":187},[181,437,207],{"class":191},[181,439,440,442,445,448,450,452],{"class":183,"line":210},[181,441,192],{"class":191},[181,443,444],{"class":187}," $index ",[181,446,447],{"class":191},"}}:",[181,449,246],{"class":191},[181,451,428],{"class":187},[181,453,207],{"class":191},[181,455,456,458,461],{"class":183,"line":217},[181,457,192],{"class":191},[181,459,460],{"class":187}," end ",[181,462,207],{"class":191},[160,464,465,468,469,472,473,476,477,480],{},[155,466,467],{},"$index"," is zero-based and ",[155,470,471],{},"$item"," is the current value. ",[155,474,475],{},"continue"," and ",[155,478,479],{},"break"," work inside loops.",[160,482,483],{},"For simple iteration you can also use the dot directly:",[172,485,487],{"className":174,"code":486,"language":176,"meta":177,"style":177},"{{ range .features }}\n- {{ . }}\n{{ end }}\n",[155,488,489,501,511],{"__ignoreMap":177},[181,490,491,493,495,497,499],{"class":183,"line":184},[181,492,192],{"class":191},[181,494,419],{"class":418},[181,496,195],{"class":191},[181,498,293],{"class":187},[181,500,207],{"class":191},[181,502,503,505,507,509],{"class":183,"line":210},[181,504,237],{"class":191},[181,506,246],{"class":191},[181,508,195],{"class":191},[181,510,305],{"class":191},[181,512,513,515,517],{"class":183,"line":217},[181,514,192],{"class":191},[181,516,460],{"class":187},[181,518,207],{"class":191},[321,520,522],{"id":521},"variables","Variables",[172,524,526],{"className":174,"code":525,"language":176,"meta":177,"style":177},"{{ $slug := .project_name | lower | snake_case }}\nmodule github.com\u002Fme\u002F{{ $slug }}\n",[155,527,528,553],{"__ignoreMap":177},[181,529,530,532,535,537,539,541,543,546,548,551],{"class":183,"line":184},[181,531,192],{"class":191},[181,533,534],{"class":187}," $slug ",[181,536,431],{"class":191},[181,538,195],{"class":191},[181,540,198],{"class":187},[181,542,201],{"class":191},[181,544,545],{"class":187}," lower ",[181,547,201],{"class":191},[181,549,550],{"class":187}," snake_case ",[181,552,207],{"class":191},[181,554,555,558,560,563,566,569,572,574],{"class":183,"line":210},[181,556,557],{"class":187},"module github",[181,559,290],{"class":191},[181,561,562],{"class":187},"com",[181,564,565],{"class":191},"\u002F",[181,567,568],{"class":187},"me",[181,570,571],{"class":191},"\u002F{{",[181,573,534],{"class":187},[181,575,207],{"class":191},[160,577,578,579,582,583,585,586,589],{},"Variables start with ",[155,580,581],{},"$",". Use ",[155,584,431],{}," to declare and ",[155,587,588],{},"="," to reassign.",[321,591,593],{"id":592},"pipes","Pipes",[172,595,597],{"className":174,"code":596,"language":176,"meta":177,"style":177},"{{ .project_name | upper | printf \"Project: %s\" }}\n",[155,598,599],{"__ignoreMap":177},[181,600,601,603,605,607,609,612,614,617,619,622,626,628],{"class":183,"line":184},[181,602,192],{"class":191},[181,604,195],{"class":191},[181,606,198],{"class":187},[181,608,201],{"class":191},[181,610,611],{"class":187}," upper ",[181,613,201],{"class":191},[181,615,616],{"class":187}," printf ",[181,618,296],{"class":191},[181,620,621],{"class":299},"Project: ",[181,623,625],{"class":624},"swJcz","%s",[181,627,296],{"class":191},[181,629,305],{"class":191},[160,631,632],{},"A pipe sends the left side as the last argument to the next function. You can chain as many as you want.",[321,634,636],{"id":635},"whitespace-control","Whitespace control",[172,638,640],{"className":174,"code":639,"language":176,"meta":177,"style":177},"{{ .name -}}\n{{- .name }}\n{{- .name -}}\n",[155,641,642,654,665],{"__ignoreMap":177},[181,643,644,646,648,651],{"class":183,"line":184},[181,645,192],{"class":191},[181,647,195],{"class":191},[181,649,650],{"class":187},"name ",[181,652,653],{"class":191},"-}}\n",[181,655,656,659,661,663],{"class":183,"line":210},[181,657,658],{"class":191},"{{-",[181,660,195],{"class":191},[181,662,650],{"class":187},[181,664,207],{"class":191},[181,666,667,669,671,673],{"class":183,"line":217},[181,668,658],{"class":191},[181,670,195],{"class":191},[181,672,650],{"class":187},[181,674,653],{"class":191},[160,676,677,679],{},[155,678,237],{}," eats whitespace on that side. Use it to avoid stray blank lines around actions.",[321,681,683],{"id":682},"named-templates","Named templates",[172,685,687],{"className":174,"code":686,"language":176,"meta":177,"style":177},"{{ define \"header\" }}\n  \u002F\u002F Generated by spin — do not edit\n{{ end }}\n\n{{ template \"header\" . }}\n",[155,688,689,705,711,719,723],{"__ignoreMap":177},[181,690,691,693,696,698,701,703],{"class":183,"line":184},[181,692,192],{"class":191},[181,694,695],{"class":187}," define ",[181,697,296],{"class":191},[181,699,700],{"class":299},"header",[181,702,296],{"class":191},[181,704,305],{"class":191},[181,706,707],{"class":183,"line":210},[181,708,710],{"class":709},"sHwdD","  \u002F\u002F Generated by spin — do not edit\n",[181,712,713,715,717],{"class":183,"line":217},[181,714,192],{"class":191},[181,716,460],{"class":187},[181,718,207],{"class":191},[181,720,721],{"class":183,"line":229},[181,722,214],{"emptyLinePlaceholder":213},[181,724,725,727,730,732,734,736,738],{"class":183,"line":234},[181,726,192],{"class":191},[181,728,729],{"class":187}," template ",[181,731,296],{"class":191},[181,733,700],{"class":299},[181,735,296],{"class":191},[181,737,195],{"class":191},[181,739,305],{"class":191},[160,741,742,745,746,749,750,753],{},[155,743,744],{},"define"," creates a reusable chunk. ",[155,747,748],{},"template"," renders it. ",[155,751,752],{},"block"," does both at once.",[321,755,757],{"id":756},"other-built-ins","Other built-ins",[160,759,760,763,764,767,768,771,772,775],{},[155,761,762],{},"len"," (length of string\u002Fslice\u002Fmap), ",[155,765,766],{},"index"," (access by index\u002Fkey), ",[155,769,770],{},"slice"," (extract sub-slice), ",[155,773,774],{},"printf"," (formatted output).",[151,777,779],{"id":778},"built-in-template-functions","Built-in template functions",[781,782,783,799],"table",{},[784,785,786],"thead",{},[787,788,789,793,796],"tr",{},[790,791,792],"th",{},"Function",[790,794,795],{},"Example",[790,797,798],{},"Output",[800,801,802,820,837,854,869,886,901,918,935,950,965,980,1002,1021],"tbody",{},[787,803,804,810,815],{},[805,806,807],"td",{},[155,808,809],{},"upper",[805,811,812],{},[155,813,814],{},"{{ .project_name | upper }}",[805,816,817],{},[155,818,819],{},"MYAPP",[787,821,822,827,832],{},[805,823,824],{},[155,825,826],{},"lower",[805,828,829],{},[155,830,831],{},"{{ .project_name | lower }}",[805,833,834],{},[155,835,836],{},"myapp",[787,838,839,844,849],{},[805,840,841],{},[155,842,843],{},"title",[805,845,846],{},[155,847,848],{},"{{ .project_name | title }}",[805,850,851],{},[155,852,853],{},"Myapp",[787,855,856,861,866],{},[805,857,858],{},[155,859,860],{},"trim",[805,862,863],{},[155,864,865],{},"{{ .description | trim }}",[805,867,868],{},"trimmed string",[787,870,871,876,881],{},[805,872,873],{},[155,874,875],{},"join",[805,877,878],{},[155,879,880],{},"{{ join .features \", \" }}",[805,882,883],{},[155,884,885],{},"auth, db",[787,887,888,893,898],{},[805,889,890],{},[155,891,892],{},"default",[805,894,895],{},[155,896,897],{},"{{ default \"myapp\" .name }}",[805,899,900],{},"uses default if empty",[787,902,903,908,913],{},[805,904,905],{},[155,906,907],{},"snake_case",[805,909,910],{},[155,911,912],{},"{{ .project_name | snake_case }}",[805,914,915],{},[155,916,917],{},"my_app",[787,919,920,925,930],{},[805,921,922],{},[155,923,924],{},"kebab",[805,926,927],{},[155,928,929],{},"{{ .project_name | kebab }}",[805,931,932],{},[155,933,934],{},"my-app",[787,936,937,942,947],{},[805,938,939],{},[155,940,941],{},"quote",[805,943,944],{},[155,945,946],{},"{{ .project_name | quote }}",[805,948,949],{},"shell-quoted string",[787,951,952,957,962],{},[805,953,954],{},[155,955,956],{},"now",[805,958,959],{},[155,960,961],{},"{{ now \"2006\" }}",[805,963,964],{},"current year",[787,966,967,972,977],{},[805,968,969],{},[155,970,971],{},"contains",[805,973,974],{},[155,975,976],{},"{{ if contains .tags \"rust\" }}...{{ end }}",[805,978,979],{},"bool",[787,981,982,987,992],{},[805,983,984],{},[155,985,986],{},"has",[805,988,989],{},[155,990,991],{},"{{ if has .features \"auth\" }}...{{ end }}",[805,993,994,997,998,1001],{},[155,995,996],{},"true"," if a ",[155,999,1000],{},"[]string"," contains the item",[787,1003,1004,1009,1014],{},[805,1005,1006],{},[155,1007,1008],{},"not_has",[805,1010,1011],{},[155,1012,1013],{},"{{ if not_has .features \"auth\" }}...{{ end }}",[805,1015,1016,997,1018,1020],{},[155,1017,996],{},[155,1019,1000],{}," does not contain the item",[787,1022,1023,1028,1033],{},[805,1024,1025],{},[155,1026,1027],{},"one_of",[805,1029,1030],{},[155,1031,1032],{},"{{ if one_of .license \"MIT\" \"Apache-2.0\" }}...{{ end }}",[805,1034,1035,1037],{},[155,1036,996],{}," if the value equals any of the items",[151,1039,1041],{"id":1040},"non-template-files","Non-template files",[160,1043,1044,1045,1047],{},"Files without ",[155,1046,157],{}," are copied as-is. This is useful for binary assets, static config, or files that do not need substitution.",[151,1049,1051],{"id":1050},"excluding-files","Excluding files",[160,1053,1054,1055,1058,1059,1061],{},"Use ",[155,1056,1057],{},"exclude"," in ",[155,1060,78],{}," to skip files:",[172,1063,1067],{"className":1064,"code":1065,"language":1066,"meta":177,"style":177},"language-toml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","exclude = [\"docs\u002F*.md\", \"*.bak\"]\n","toml",[155,1068,1069],{"__ignoreMap":177},[181,1070,1071,1074,1076,1079,1081,1084,1086,1088,1091,1094,1096],{"class":183,"line":184},[181,1072,1073],{"class":187},"exclude ",[181,1075,588],{"class":191},[181,1077,1078],{"class":191}," [",[181,1080,296],{"class":191},[181,1082,1083],{"class":299},"docs\u002F*.md",[181,1085,296],{"class":191},[181,1087,425],{"class":191},[181,1089,1090],{"class":191}," \"",[181,1092,1093],{"class":299},"*.bak",[181,1095,296],{"class":191},[181,1097,1098],{"class":191},"]\n",[160,1100,1101,1102,1105,1106,1109],{},"Patterns support ",[155,1103,1104],{},"*"," (single directory segment) and ",[155,1107,1108],{},"**"," (any number of segments).",[151,1111,1113],{"id":1112},"path-safety","Path safety",[160,1115,1116,1119],{},[155,1117,1118],{},"spin"," rejects any rendered path that resolves outside the destination directory. This protects users from malicious templates.",[151,1121,1123],{"id":1122},"license-generation","License generation",[160,1125,1126,1127,1130,1131,1134,1135,1137,1138,1140],{},"When a template declares a ",[155,1128,1129],{},"license"," param with ",[155,1132,1133],{},"type = \"license\"",", spin adds an extra step after rendering ",[155,1136,314],{}," files: it inspects the resolved ",[155,1139,1129],{}," value.",[351,1142,1143,1156,1167,1177],{},[354,1144,1145,1146,1151,1152,1155],{},"If the value is a known SPDX identifier (see ",[1147,1148,1150],"a",{"href":1149},"#supported-licenses","supported licenses","), spin generates a ",[155,1153,1154],{},"LICENSE"," file from the bundled canonical text.",[354,1157,1158,1159,1162,1163,1166],{},"The ",[155,1160,1161],{},"copyright_holder"," and current ",[155,1164,1165],{},"year"," are substituted into the license text using Go template syntax.",[354,1168,1169,1170,1173,1174,1176],{},"If the value is ",[155,1171,1172],{},"\"None\""," or unknown, no ",[155,1175,1154],{}," file is generated (no error).",[354,1178,1179,1180,300,1182,300,1185,300,1188,1191,1192,1195,1196,1199],{},"If the template already contains a ",[155,1181,1154],{},[155,1183,1184],{},"LICENSE.txt",[155,1186,1187],{},"LICENSE.md",[155,1189,1190],{},"COPYING",", or ",[155,1193,1194],{},"COPYING.txt"," file in ",[155,1197,1198],{},"_base\u002F",", spin never overwrites it.",[160,1201,1202],{},"This means you can write:",[172,1204,1208],{"className":1205,"code":1206,"language":1207,"meta":177,"style":177},"language-tmpl shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{{ .name }} -- Copyright {{ now \"2006\" }} {{ .copyright_holder }}\n","tmpl",[155,1209,1210],{"__ignoreMap":177},[181,1211,1212],{"class":183,"line":184},[181,1213,1206],{},[160,1215,1216],{},"to show the copyright line elsewhere, while spin still generates the full LICENSE file.",[321,1218,1220],{"id":1219},"outcomes","Outcomes",[781,1222,1223,1239],{},[784,1224,1225],{},[787,1226,1227,1232,1236],{},[790,1228,1229,1231],{},[155,1230,1129],{}," value",[790,1233,1234],{},[155,1235,1161],{},[790,1237,1238],{},"Result",[800,1240,1241,1254,1266,1285,1301],{},[787,1242,1243,1246,1249],{},[805,1244,1245],{},"known SPDX id",[805,1247,1248],{},"any",[805,1250,1251,1253],{},[155,1252,1154],{}," written; year and holder substituted",[787,1255,1256,1258,1261],{},[805,1257,1245],{},[805,1259,1260],{},"empty \u002F absent",[805,1262,1263,1265],{},[155,1264,1154],{}," written; ownership placeholder left as-is",[787,1267,1268,1277,1279],{},[805,1269,1270,1272,1273,1276],{},[155,1271,401],{}," \u002F ",[155,1274,1275],{},"Proprietary"," \u002F empty",[805,1278,1248],{},[805,1280,1281,1282,1284],{},"no ",[155,1283,1154],{}," file",[787,1286,1287,1294,1296],{},[805,1288,1289,1290,1293],{},"unknown id (or outside custom ",[155,1291,1292],{},"options",")",[805,1295,1248],{},[805,1297,1281,1298,1300],{},[155,1299,1154],{}," file, no error",[787,1302,1303,1305,1307],{},[805,1304,1248],{},[805,1306,1248],{},[805,1308,1309,1310,565,1313,1315],{},"existing ",[155,1311,1312],{},"_base\u002FLICENSE",[155,1314,1190],{}," file is never overwritten",[321,1317,1319],{"id":1318},"supported-licenses","Supported licenses",[160,1321,1322,1323,1329,1330,1332,1333,476,1335,1337],{},"The license texts are the canonical SPDX templates from the ",[1147,1324,1328],{"href":1325,"rel":1326},"https:\u002F\u002Fspdx.org\u002Flicenses\u002F",[1327],"nofollow","SPDX License List"," (v3.24+), bundled into ",[155,1331,1118],{}," at build time. Selecting a known ID generates the official text with ",[155,1334,1165],{},[155,1336,1161],{}," substitution.",[781,1339,1340,1349],{},[784,1341,1342],{},[787,1343,1344,1347],{},[790,1345,1346],{},"SPDX ID",[790,1348,1238],{},[800,1350,1351,1363,1372,1381,1390,1399,1408,1417,1426,1435,1444,1453,1462,1471,1483],{},[787,1352,1353,1357],{},[805,1354,1355],{},[155,1356,359],{},[805,1358,1359,1360],{},"MIT License with ",[155,1361,1362],{},"\u003Cyear> \u003Ccopyright holders>",[787,1364,1365,1369],{},[805,1366,1367],{},[155,1368,362],{},[805,1370,1371],{},"Apache License 2.0",[787,1373,1374,1378],{},[805,1375,1376],{},[155,1377,368],{},[805,1379,1380],{},"BSD 2-Clause License",[787,1382,1383,1387],{},[805,1384,1385],{},[155,1386,365],{},[805,1388,1389],{},"BSD 3-Clause License",[787,1391,1392,1396],{},[805,1393,1394],{},[155,1395,386],{},[805,1397,1398],{},"GNU GPLv2 only",[787,1400,1401,1405],{},[805,1402,1403],{},[155,1404,389],{},[805,1406,1407],{},"GNU GPLv3 only",[787,1409,1410,1414],{},[805,1411,1412],{},[155,1413,395],{},[805,1415,1416],{},"GNU LGPLv3 only",[787,1418,1419,1423],{},[805,1420,1421],{},[155,1422,383],{},[805,1424,1425],{},"Mozilla Public License 2.0",[787,1427,1428,1432],{},[805,1429,1430],{},[155,1431,392],{},[805,1433,1434],{},"GNU AGPLv3 only",[787,1436,1437,1441],{},[805,1438,1439],{},[155,1440,377],{},[805,1442,1443],{},"The Unlicense",[787,1445,1446,1450],{},[805,1447,1448],{},[155,1449,380],{},[805,1451,1452],{},"Creative Commons Zero v1.0 Universal",[787,1454,1455,1459],{},[805,1456,1457],{},[155,1458,371],{},[805,1460,1461],{},"ISC License",[787,1463,1464,1468],{},[805,1465,1466],{},[155,1467,374],{},[805,1469,1470],{},"BSD Zero Clause License",[787,1472,1473,1477],{},[805,1474,1475],{},[155,1476,401],{},[805,1478,1479],{},[1480,1481,1482],"strong",{},"No file generated",[787,1484,1485,1491],{},[805,1486,1487],{},[1488,1489,1490],"em",{},"unknown",[805,1492,1493,1495],{},[1480,1494,1482],{}," (no error)",[1497,1498,1499],"blockquote",{},[160,1500,1501,1502,1505,1506,1509],{},"The license generation is a side-effect: the ",[155,1503,1504],{},".license"," value remains available in templates like any other param (",[155,1507,1508],{},"{{ .license }}",").",[151,1511,1513],{"id":1512},"common-patterns","Common patterns",[160,1515,1516,1519,1520,243],{},[1480,1517,1518],{},"License header at the top of every file."," Define it once and reuse with ",[155,1521,748],{},[172,1523,1525],{"className":1205,"code":1524,"language":1207,"meta":177,"style":177},"{{ define \"header\" }}\n\u002F\u002F Copyright {{ now \"2006\" }} {{ .author }}\n\u002F\u002F SPDX-License-Identifier: {{ .license }}\n{{ end }}\n\n{{ template \"header\" . }}\n\npackage main\n",[155,1526,1527,1532,1537,1542,1547,1551,1556,1560],{"__ignoreMap":177},[181,1528,1529],{"class":183,"line":184},[181,1530,1531],{},"{{ define \"header\" }}\n",[181,1533,1534],{"class":183,"line":210},[181,1535,1536],{},"\u002F\u002F Copyright {{ now \"2006\" }} {{ .author }}\n",[181,1538,1539],{"class":183,"line":217},[181,1540,1541],{},"\u002F\u002F SPDX-License-Identifier: {{ .license }}\n",[181,1543,1544],{"class":183,"line":229},[181,1545,1546],{},"{{ end }}\n",[181,1548,1549],{"class":183,"line":234},[181,1550,214],{"emptyLinePlaceholder":213},[181,1552,1553],{"class":183,"line":256},[181,1554,1555],{},"{{ template \"header\" . }}\n",[181,1557,1558],{"class":183,"line":275},[181,1559,214],{"emptyLinePlaceholder":213},[181,1561,1563],{"class":183,"line":1562},8,[181,1564,1565],{},"package main\n",[160,1567,1568,1571],{},[1480,1569,1570],{},"Module path from project name."," Declare a variable to avoid repeating pipes:",[172,1573,1575],{"className":1205,"code":1574,"language":1207,"meta":177,"style":177},"{{ $slug := .project_name | lower | snake_case }}\nmodule github.com\u002F{{ .org }}\u002F{{ $slug }}\n",[155,1576,1577,1582],{"__ignoreMap":177},[181,1578,1579],{"class":183,"line":184},[181,1580,1581],{},"{{ $slug := .project_name | lower | snake_case }}\n",[181,1583,1584],{"class":183,"line":210},[181,1585,1586],{},"module github.com\u002F{{ .org }}\u002F{{ $slug }}\n",[160,1588,1589,1595],{},[1480,1590,1591,1592,290],{},"Conditional file with ",[155,1593,1594],{},"[[include]]"," Include a CI directory only when the user opts in:",[172,1597,1599],{"className":1064,"code":1598,"language":1066,"meta":177,"style":177},"# spin.toml\n[params]\nci = { type = \"bool\", prompt = \"Include CI?\", default = true }\n\n[[include]]\npath = \".github\u002F**\"\nif = \"{{ .ci }}\"\n",[155,1600,1601,1606,1617,1666,1670,1681,1696],{"__ignoreMap":177},[181,1602,1603],{"class":183,"line":184},[181,1604,1605],{"class":709},"# spin.toml\n",[181,1607,1608,1611,1615],{"class":183,"line":210},[181,1609,1610],{"class":191},"[",[181,1612,1614],{"class":1613},"sBMFI","params",[181,1616,1098],{"class":191},[181,1618,1619,1622,1624,1627,1630,1632,1634,1636,1638,1640,1643,1645,1647,1650,1652,1654,1657,1659,1663],{"class":183,"line":217},[181,1620,1621],{"class":187},"ci ",[181,1623,588],{"class":191},[181,1625,1626],{"class":191}," {",[181,1628,1629],{"class":187}," type ",[181,1631,588],{"class":191},[181,1633,1090],{"class":191},[181,1635,979],{"class":299},[181,1637,296],{"class":191},[181,1639,425],{"class":191},[181,1641,1642],{"class":187}," prompt ",[181,1644,588],{"class":191},[181,1646,1090],{"class":191},[181,1648,1649],{"class":299},"Include CI?",[181,1651,296],{"class":191},[181,1653,425],{"class":191},[181,1655,1656],{"class":187}," default ",[181,1658,588],{"class":191},[181,1660,1662],{"class":1661},"sfNiH"," true",[181,1664,1665],{"class":191}," }\n",[181,1667,1668],{"class":183,"line":229},[181,1669,214],{"emptyLinePlaceholder":213},[181,1671,1672,1675,1678],{"class":183,"line":234},[181,1673,1674],{"class":191},"[[",[181,1676,1677],{"class":1613},"include",[181,1679,1680],{"class":191},"]]\n",[181,1682,1683,1686,1688,1690,1693],{"class":183,"line":256},[181,1684,1685],{"class":187},"path ",[181,1687,588],{"class":191},[181,1689,1090],{"class":191},[181,1691,1692],{"class":299},".github\u002F**",[181,1694,1695],{"class":191},"\"\n",[181,1697,1698,1701,1703,1705,1708],{"class":183,"line":275},[181,1699,1700],{"class":187},"if ",[181,1702,588],{"class":191},[181,1704,1090],{"class":191},[181,1706,1707],{"class":299},"{{ .ci }}",[181,1709,1695],{"class":191},[160,1711,1712,1715,1716,243],{},[1480,1713,1714],{},"Conditional content inside a file."," Show or hide blocks with ",[155,1717,1718],{},"if",[172,1720,1722],{"className":1205,"code":1721,"language":1207,"meta":177,"style":177},"{{ if eq .license \"MIT\" }}\n\u002F\u002F MIT License text here\n{{ else if eq .license \"Apache-2.0\" }}\n\u002F\u002F Apache 2.0 License text here\n{{ end }}\n",[155,1723,1724,1729,1734,1739,1744],{"__ignoreMap":177},[181,1725,1726],{"class":183,"line":184},[181,1727,1728],{},"{{ if eq .license \"MIT\" }}\n",[181,1730,1731],{"class":183,"line":210},[181,1732,1733],{},"\u002F\u002F MIT License text here\n",[181,1735,1736],{"class":183,"line":217},[181,1737,1738],{},"{{ else if eq .license \"Apache-2.0\" }}\n",[181,1740,1741],{"class":183,"line":229},[181,1742,1743],{},"\u002F\u002F Apache 2.0 License text here\n",[181,1745,1746],{"class":183,"line":234},[181,1747,1546],{},[160,1749,1750,1753],{},[1480,1751,1752],{},"Iterating features."," Loop over a multiselect param:",[172,1755,1757],{"className":1205,"code":1756,"language":1207,"meta":177,"style":177},"{{ range .features }}\nimport _ \"github.com\u002Fme\u002F{{ . }}\"\n{{ end }}\n",[155,1758,1759,1764,1769],{"__ignoreMap":177},[181,1760,1761],{"class":183,"line":184},[181,1762,1763],{},"{{ range .features }}\n",[181,1765,1766],{"class":183,"line":210},[181,1767,1768],{},"import _ \"github.com\u002Fme\u002F{{ . }}\"\n",[181,1770,1771],{"class":183,"line":217},[181,1772,1546],{},[160,1774,1775,1778,1779,1781],{},[1480,1776,1777],{},"Clean JSON with join."," Use ",[155,1780,875],{}," to produce valid arrays:",[172,1783,1785],{"className":1205,"code":1784,"language":1207,"meta":177,"style":177},"{\n  \"dependencies\": [\"{{ join .deps \"\\\", \\\"\" }}\"]\n}\n",[155,1786,1787,1792,1797],{"__ignoreMap":177},[181,1788,1789],{"class":183,"line":184},[181,1790,1791],{},"{\n",[181,1793,1794],{"class":183,"line":210},[181,1795,1796],{},"  \"dependencies\": [\"{{ join .deps \"\\\", \\\"\" }}\"]\n",[181,1798,1799],{"class":183,"line":217},[181,1800,1801],{},"}\n",[1803,1804,1805],"style",{},"html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}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 .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}",{"title":177,"searchDepth":210,"depth":210,"links":1807},[1808,1810,1819,1820,1821,1822,1823,1827],{"id":153,"depth":210,"text":1809},".tmpl files",{"id":308,"depth":210,"text":309,"children":1811},[1812,1813,1814,1815,1816,1817,1818],{"id":323,"depth":217,"text":324},{"id":405,"depth":217,"text":406},{"id":521,"depth":217,"text":522},{"id":592,"depth":217,"text":593},{"id":635,"depth":217,"text":636},{"id":682,"depth":217,"text":683},{"id":756,"depth":217,"text":757},{"id":778,"depth":210,"text":779},{"id":1040,"depth":210,"text":1041},{"id":1050,"depth":210,"text":1051},{"id":1112,"depth":210,"text":1113},{"id":1122,"depth":210,"text":1123,"children":1824},[1825,1826],{"id":1219,"depth":217,"text":1220},{"id":1318,"depth":217,"text":1319},{"id":1512,"depth":210,"text":1513},"How spin processes _base\u002F files through Go text\u002Ftemplate with built-in helpers, excludes, and path safety.","md",null,{},{"title":66,"description":1828},"BE_2CJ2s5YvQx-n6Unw7E__3jZCyqTFRWhSqpJqYMmo",[1835,1837],{"title":62,"path":63,"stem":64,"description":1836,"children":-1},"Params are the questions a template asks the user. They are declared in spin.toml under [params].",{"title":70,"path":71,"stem":72,"description":1838,"children":-1},"Hooks are shell commands declared in spin.toml. They are rendered through text\u002Ftemplate with the resolved param values and run via sh -c in the generated pro...",1787755180240]