[{"data":1,"prerenderedAt":39},["ShallowReactive",2],{"clay-page:\u002F3.x\u002Fguides\u002Fmigrating-from-clay-1":3},{"html":4,"toc":5,"description":35,"hero":36,"list":37,"socialImage":38},"\u003Ch1 id=\"migrating-from-clay-1\">Migrating from Clay 1\u003C\u002Fh1>\n\u003Cp>Clay 1 needed two parts: the Clay frontend and Clay Oven, a separate Go tool that prepared the docs. Clay 2 is a single npm package, \u003Ccode>clay-doc\u003C\u002Fcode>, that does both. Your docs and \u003Ccode>clay.yaml\u003C\u002Fcode> keep working; what changes is how you build. This page covers the step to Clay 2; continue with \u003Ca href=\"\u002Fclay-example-repo\u002F3.x\u002Fguides\u002Fupgrading-to-clay-3\" data-route=\"\u002F3.x\u002Fguides\u002Fupgrading-to-clay-3\">upgrading to Clay 3\u003C\u002Fa> afterwards.\u003C\u002Fp>\n\u003Ch2 id=\"what-stays-the-same\">\u003Ca class=\"heading-anchor\" href=\"#what-stays-the-same\" aria-label=\"Link to this section\" data-route=\"#what-stays-the-same\">#\u003C\u002Fa>What stays the same\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>The \u003Ccode>docs\u002F\u003C\u002Fcode> folder, Markdown files and their front matter.\u003C\u002Fli>\n\u003Cli>\u003Ccode>clay.yaml\u003C\u002Fcode> and \u003Ccode>dir-meta.yaml\u003C\u002Fcode>, with all their settings (Clay 3 then moves \u003Ccode>dir-meta.yaml\u003C\u002Fcode> into \u003Ccode>index.md\u003C\u002Fcode> files).\u003C\u002Fli>\n\u003Cli>The environment variables \u003Ccode>CLAY_TITLE\u003C\u002Fcode>, \u003Ccode>CLAY_BASE_URL\u003C\u002Fcode>, \u003Ccode>CLAY_SITE_URL\u003C\u002Fcode> and \u003Ccode>CLAY_FONTAWESOME_KIT\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>The URLs of your pages.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"what-changes\">\u003Ca class=\"heading-anchor\" href=\"#what-changes\" aria-label=\"Link to this section\" data-route=\"#what-changes\">#\u003C\u002Fa>What changes\u003C\u002Fh2>\n\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Clay 1\u003C\u002Fth>\n\u003Cth>Clay 2\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\u003Ctr>\n\u003Ctd>Download Clay Oven, run \u003Ccode>.\u002Fclay-oven\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>npm install --save-dev clay-doc\u003C\u002Fcode>, run \u003Ccode>npx clay build\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Output in \u003Ccode>output\u002F\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Output in \u003Ccode>publish\u002Fpublic\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>run-oven.sh\u003C\u002Fcode> in CI\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>npm ci\u003C\u002Fcode> and \u003Ccode>npx clay build --strict\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>-c\u003C\u002Fcode>, \u003Ccode>-d\u003C\u002Fcode>, \u003Ccode>-o\u003C\u002Fcode>, \u003Ccode>-fm\u003C\u002Fcode> flags\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>--root\u003C\u002Fcode> and \u003Ccode>--out\u003C\u002Fcode>; the file names are fixed\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>-nc\u003C\u002Fcode>, \u003Ccode>-ci\u003C\u002Fcode> to skip prompts\u003C\u002Ftd>\n\u003Ctd>No prompts anymore\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>langs\u003C\u002Fcode> in \u003Ccode>clay.yaml\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Not needed: languages of code blocks are detected\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>No live preview\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>npx clay dev\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\u003C\u002Ftable>\n\u003Ch2 id=\"step-by-step\">\u003Ca class=\"heading-anchor\" href=\"#step-by-step\" aria-label=\"Link to this section\" data-route=\"#step-by-step\">#\u003C\u002Fa>Step by step\u003C\u002Fh2>\n\u003Ch3 id=\"1-install-clay\">\u003Ca class=\"heading-anchor\" href=\"#1-install-clay\" aria-label=\"Link to this section\" data-route=\"#1-install-clay\">#\u003C\u002Fa>1. Install Clay\u003C\u002Fh3>\n\u003Cdiv class=\"code-block is-terminal has-bar\">\u003Cdiv class=\"code-terminal\" aria-hidden=\"true\">\u003Cspan>\u003C\u002Fspan>\u003Cspan>\u003C\u002Fspan>\u003Cspan>\u003C\u002Fspan>\u003C\u002Fdiv>\u003Cpre class=\"shiki shiki-themes light-plus dark-plus\" style=\"--shiki-light:#000000;--shiki-dark:#D4D4D4;--shiki-light-bg:#FFFFFF;--shiki-dark-bg:#1E1E1E\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line command\">\u003Cspan style=\"--shiki-light:#695221;--shiki-dark:#DCDCAA\">npm\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#A31515;--shiki-dark:#CE9178\"> init\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#0000FF;--shiki-dark:#569CD6\"> -y\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#006400;--shiki-dark:#6A9955\">                       # only if there is no package.json yet\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line command\">\u003Cspan style=\"--shiki-light:#695221;--shiki-dark:#DCDCAA\">npm\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#A31515;--shiki-dark:#CE9178\"> install\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#0000FF;--shiki-dark:#569CD6\"> --save-dev\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#A31515;--shiki-dark:#CE9178\"> clay-doc\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003Cbutton type=\"button\" class=\"copy-code btn btn-sm btn-square btn-ghost\" title=\"Copy code\" aria-label=\"Copy code\">\u003Ci class=\"fa-solid fa-copy\">\u003C\u002Fi>\u003C\u002Fbutton>\u003C\u002Fdiv>\n\u003Ch3 id=\"2-clean-up-clayyaml\">\u003Ca class=\"heading-anchor\" href=\"#2-clean-up-clayyaml\" aria-label=\"Link to this section\" data-route=\"#2-clean-up-clayyaml\">#\u003C\u002Fa>2. Clean up clay.yaml\u003C\u002Fh3>\n\u003Cp>Remove \u003Ccode>langs\u003C\u002Fcode>, if you have it. Clay 2 warns about it but works anyway.\u003C\u002Fp>\n\u003Ch3 id=\"3-update-gitignore\">\u003Ca class=\"heading-anchor\" href=\"#3-update-gitignore\" aria-label=\"Link to this section\" data-route=\"#3-update-gitignore\">#\u003C\u002Fa>3. Update .gitignore\u003C\u002Fh3>\n\u003Cdiv class=\"code-block\">\u003Cpre class=\"shiki shiki-themes light-plus dark-plus\" style=\"--shiki-light:#000000;--shiki-dark:#D4D4D4;--shiki-light-bg:#FFFFFF;--shiki-dark-bg:#1E1E1E\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>node_modules\u002F\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>publish\u002F\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>output\u002F\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003Cbutton type=\"button\" class=\"copy-code btn btn-sm btn-square btn-ghost\" title=\"Copy code\" aria-label=\"Copy code\">\u003Ci class=\"fa-solid fa-copy\">\u003C\u002Fi>\u003C\u002Fbutton>\u003C\u002Fdiv>\n\u003Ch3 id=\"4-build-and-check\">\u003Ca class=\"heading-anchor\" href=\"#4-build-and-check\" aria-label=\"Link to this section\" data-route=\"#4-build-and-check\">#\u003C\u002Fa>4. Build and check\u003C\u002Fh3>\n\u003Cdiv class=\"code-block is-terminal has-bar\">\u003Cdiv class=\"code-terminal\" aria-hidden=\"true\">\u003Cspan>\u003C\u002Fspan>\u003Cspan>\u003C\u002Fspan>\u003Cspan>\u003C\u002Fspan>\u003C\u002Fdiv>\u003Cpre class=\"shiki shiki-themes light-plus dark-plus\" style=\"--shiki-light:#000000;--shiki-dark:#D4D4D4;--shiki-light-bg:#FFFFFF;--shiki-dark-bg:#1E1E1E\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line command\">\u003Cspan style=\"--shiki-light:#695221;--shiki-dark:#DCDCAA\">npx\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#A31515;--shiki-dark:#CE9178\"> clay\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#A31515;--shiki-dark:#CE9178\"> build\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#0000FF;--shiki-dark:#569CD6\"> --strict\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003Cbutton type=\"button\" class=\"copy-code btn btn-sm btn-square btn-ghost\" title=\"Copy code\" aria-label=\"Copy code\">\u003Ci class=\"fa-solid fa-copy\">\u003C\u002Fi>\u003C\u002Fbutton>\u003C\u002Fdiv>\n\u003Cp>Clay 2 checks links and settings more thoroughly than Clay Oven did. Fix what it reports; see \u003Ca href=\"\u002Fclay-example-repo\u002F3.x\u002Fcli\u002Fbuild-checks\" data-route=\"\u002F3.x\u002Fcli\u002Fbuild-checks\">build checks\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch3 id=\"5-update-ci\">\u003Ca class=\"heading-anchor\" href=\"#5-update-ci\" aria-label=\"Link to this section\" data-route=\"#5-update-ci\">#\u003C\u002Fa>5. Update CI\u003C\u002Fh3>\n\u003Cp>Replace the Clay Oven step in your workflow:\u003C\u002Fp>\n\u003Cdiv class=\"code-block\">\u003Cpre class=\"shiki shiki-themes light-plus dark-plus has-diff\" style=\"--shiki-light:#000000;--shiki-dark:#D4D4D4;--shiki-light-bg:#FFFFFF;--shiki-dark-bg:#1E1E1E\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#000000;--shiki-dark:#D4D4D4\">- \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#800000;--shiki-dark:#569CD6\">name\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#000000;--shiki-dark:#D4D4D4\">: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#0000FF;--shiki-dark:#CE9178\">Build docs\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line diff remove\">\u003Cspan style=\"--shiki-light:#800000;--shiki-dark:#569CD6\">  run\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#000000;--shiki-dark:#D4D4D4\">: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#0000FF;--shiki-dark:#CE9178\">curl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fclay-doc\u002Fclay-oven\u002Frefs\u002Fheads\u002Fmain\u002Frun-oven.sh | sh\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line diff add\">\u003Cspan style=\"--shiki-light:#000000;--shiki-dark:#D4D4D4\">- \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#800000;--shiki-dark:#569CD6\">uses\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#000000;--shiki-dark:#D4D4D4\">: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#0000FF;--shiki-dark:#CE9178\">actions\u002Fsetup-node@v7\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line diff add\">\u003Cspan style=\"--shiki-light:#800000;--shiki-dark:#569CD6\">  with\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#000000;--shiki-dark:#D4D4D4\">: \u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line diff add\">\u003Cspan style=\"--shiki-light:#800000;--shiki-dark:#569CD6\">    node-version\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#000000;--shiki-dark:#D4D4D4\">: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#0000FF;--shiki-dark:#CE9178\">lts\u002F*\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line diff add\">\u003Cspan style=\"--shiki-light:#800000;--shiki-dark:#569CD6\">    cache\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#000000;--shiki-dark:#D4D4D4\">: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#0000FF;--shiki-dark:#CE9178\">npm\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line diff add\">\u003Cspan style=\"--shiki-light:#000000;--shiki-dark:#D4D4D4\">- \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#800000;--shiki-dark:#569CD6\">run\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#000000;--shiki-dark:#D4D4D4\">: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#0000FF;--shiki-dark:#CE9178\">npm ci\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line diff add\">\u003Cspan style=\"--shiki-light:#000000;--shiki-dark:#D4D4D4\">- \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#800000;--shiki-dark:#569CD6\">run\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#000000;--shiki-dark:#D4D4D4\">: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#0000FF;--shiki-dark:#CE9178\">npx clay build --strict\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003Cbutton type=\"button\" class=\"copy-code btn btn-sm btn-square btn-ghost\" title=\"Copy code\" aria-label=\"Copy code\">\u003Ci class=\"fa-solid fa-copy\">\u003C\u002Fi>\u003C\u002Fbutton>\u003C\u002Fdiv>\n\u003Cp>and upload \u003Ccode>publish\u002Fpublic\u003C\u002Fcode> instead of \u003Ccode>output\u003C\u002Fcode>. \u003Ca href=\"\u002Fclay-example-repo\u002F3.x\u002Fdeployment\u002Fgithub-pages\" data-route=\"\u002F3.x\u002Fdeployment\u002Fgithub-pages\">GitHub Pages\u003C\u002Fa> has a complete workflow.\u003C\u002Fp>\n\u003Ch2 id=\"new-in-clay-2\">\u003Ca class=\"heading-anchor\" href=\"#new-in-clay-2\" aria-label=\"Link to this section\" data-route=\"#new-in-clay-2\">#\u003C\u002Fa>New in Clay 2\u003C\u002Fh2>\n\u003Cp>Once migrated, these are available without further work:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>a live preview with \u003Ccode>clay dev\u003C\u002Fcode>,\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fclay-example-repo\u002F3.x\u002Fcli\u002Fbuild-checks\" data-route=\"\u002F3.x\u002Fcli\u002Fbuild-checks\">build checks\u003C\u002Fa> for links and settings,\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fclay-example-repo\u002F3.x\u002Ffeatures\u002Fsearch\" data-route=\"\u002F3.x\u002Ffeatures\u002Fsearch\">search\u003C\u002Fa> with typo tolerance, and \u003Ca href=\"\u002Fclay-example-repo\u002F3.x\u002Ffeatures\u002Fseo\" data-route=\"\u002F3.x\u002Ffeatures\u002Fseo\">SEO\u003C\u002Fa> with a sitemap,\u003C\u002Fli>\n\u003Cli>\u003Ccode>description\u003C\u002Fcode> and \u003Ccode>order\u003C\u002Fcode> in the front matter,\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fclay-example-repo\u002F3.x\u002Forganizing\u002Fclay-edit\" data-route=\"\u002F3.x\u002Forganizing\u002Fclay-edit\">clay edit\u003C\u002Fa>, \u003Ca href=\"\u002Fclay-example-repo\u002F3.x\u002Fversions-and-languages\u002Fversions\" data-route=\"\u002F3.x\u002Fversions-and-languages\u002Fversions\">versions\u003C\u002Fa> and \u003Ca href=\"\u002Fclay-example-repo\u002F3.x\u002Fversions-and-languages\u002Ftranslations\" data-route=\"\u002F3.x\u002Fversions-and-languages\u002Ftranslations\">translations\u003C\u002Fa>.\u003C\u002Fli>\n\u003C\u002Ful>\n",[6,10,13,16,20,23,26,29,32],{"id":7,"text":8,"level":9},"what-stays-the-same","What stays the same",2,{"id":11,"text":12,"level":9},"what-changes","What changes",{"id":14,"text":15,"level":9},"step-by-step","Step by step",{"id":17,"text":18,"level":19},"1-install-clay","1. Install Clay",3,{"id":21,"text":22,"level":19},"2-clean-up-clayyaml","2. Clean up clay.yaml",{"id":24,"text":25,"level":19},"3-update-gitignore","3. Update .gitignore",{"id":27,"text":28,"level":19},"4-build-and-check","4. Build and check",{"id":30,"text":31,"level":19},"5-update-ci","5. Update CI",{"id":33,"text":34,"level":9},"new-in-clay-2","New in Clay 2","Move a Clay 1 site built with Clay Oven to Clay 2, step by step.",null,false,"\u002F_clay\u002Fsocial\u002F3.x\u002Fguides\u002Fmigrating-from-clay-1.png",1792666369085]