[{"data":1,"prerenderedAt":23},["ShallowReactive",2],{"clay-page:\u002Forganizing\u002Fredirects":3},{"html":4,"toc":5,"description":19,"hero":20,"list":21,"socialImage":22},"\u003Ch1 id=\"redirects\">Redirects\u003C\u002Fh1>\n\u003Cp>A page’s address comes from its path in \u003Ccode>docs\u002F\u003C\u002Fcode>. When the page moves or gets a new name, bookmarks, search results and links from other sites still point to the old address. List the old addresses in the page’s front matter, and they lead to the page:\u003C\u002Fp>\n\u003Cdiv class=\"code-block has-title\">\u003Cdiv class=\"code-title\">\u003Ci class=\"fa-regular fa-file-lines\" aria-hidden=\"true\">\u003C\u002Fi>\u003Cspan>docs\u002Fguides\u002Fsetup.md\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\">\u003Cspan style=\"--shiki-light:#000000;--shiki-dark:#D4D4D4\">---\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#800000;--shiki-dark:#569CD6\">title\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#000000FF;--shiki-dark:#D4D4D4\">: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#0000FF;--shiki-dark:#CE9178\">Setup\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#800000;--shiki-dark:#569CD6\">redirects\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#000000FF;--shiki-dark:#D4D4D4\">: [\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#A31515;--shiki-dark:#CE9178\">\"\u002Finstallation\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#000000FF;--shiki-dark:#D4D4D4\">, \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#A31515;--shiki-dark:#CE9178\">\"\u002Fgetting-started\u002Finstall\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#000000FF;--shiki-dark:#D4D4D4\">]\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#000000;--shiki-dark:#D4D4D4\">---\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>Readers who open \u003Ccode>\u002Finstallation\u003C\u002Fcode> land on \u003Ccode>\u002Fguides\u002Fsetup\u003C\u002Fcode>, at the same section: \u003Ccode>\u002Finstallation#requirements\u003C\u002Fcode> opens \u003Ccode>\u002Fguides\u002Fsetup#requirements\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cdiv class=\"markdown-alert markdown-alert-tip\">\n\u003Cp class=\"markdown-alert-title text-primary\">\u003Ci class=\"fa-solid fa-lightbulb mr-2\">\u003C\u002Fi>Tip\u003C\u002Fp>\n\u003Cp>This site keeps the addresses of its Clay 3 docs. \u003Ca href=\"https:\u002F\u002Fclay-doc.github.io\u002Fclay-example-repo\u002Fdeployment\u002Fgithub-pages\" target=\"_blank\" rel=\"noopener noreferrer\">\u003Ci class=\"fa-solid fa-arrow-up-right-from-square clay-external-icon\" aria-hidden=\"true\">\u003C\u002Fi>\u003Ccode>\u002Fdeployment\u002Fgithub-pages\u003C\u002Fcode>\u003C\u002Fa> leads to \u003Ca href=\"\u002Fclay-example-repo\u002Fpublishing\u002Fgithub-pages\" data-route=\"\u002Fpublishing\u002Fgithub-pages\">GitHub Pages\u003C\u002Fa>, which has \u003Ccode>redirects: [\"\u002Fdeployment\u002Fgithub-pages\"]\u003C\u002Fcode>.\u003C\u002Fp>\n\u003C\u002Fdiv>\n\u003Ch2 id=\"addresses\">\u003Ca class=\"heading-anchor\" href=\"#addresses\" aria-label=\"Link to this section\" data-route=\"#addresses\">#\u003C\u002Fa>Addresses\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Cstrong>Write them from the root of the docs\u003C\u002Fstrong>, like a link starting with \u003Ccode>\u002F\u003C\u002Fcode>, without the \u003Ccode>baseURL\u003C\u002Fcode>: \u003Ccode>\u002Finstallation\u003C\u002Fcode>, not \u003Ccode>\u002Fmy-project\u002Finstallation\u003C\u002Fcode>. A trailing \u003Ccode>\u002F\u003C\u002Fcode> or \u003Ccode>.md\u003C\u002Fcode> may stay.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>They count in every language.\u003C\u002Fstrong> Translations use the redirects of the original: \u003Ccode>\u002Finstallation\u003C\u002Fcode> on the German page is \u003Ccode>\u002Fde\u002Finstallation\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>In an older version\u003C\u002Fstrong>, they stay within it: in \u003Ccode>docs\u002F1.x\u002F\u003C\u002Fcode>, \u003Ccode>\u002Finstallation\u003C\u002Fcode> is \u003Ccode>\u002F1.x\u002Finstallation\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>An address that is a page itself\u003C\u002Fstrong>, or that another page already lists, is skipped with a warning, and so are addresses of other sites.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"moving-pages-with-clay-edit\">\u003Ca class=\"heading-anchor\" href=\"#moving-pages-with-clay-edit\" aria-label=\"Link to this section\" data-route=\"#moving-pages-with-clay-edit\">#\u003C\u002Fa>Moving pages with clay edit\u003C\u002Fh2>\n\u003Cp>\u003Ccode>clay edit move\u003C\u002Fcode> and \u003Ccode>rename\u003C\u002Fcode> add the old address when you ask them to:\u003C\u002Fp>\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\"> edit\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#A31515;--shiki-dark:#CE9178\"> move\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#A31515;--shiki-dark:#CE9178\"> setup.md\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#A31515;--shiki-dark:#CE9178\"> guides\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#0000FF;--shiki-dark:#569CD6\"> --redirect\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>In the \u003Ca href=\"\u002Fclay-example-repo\u002Forganizing\u002Fclay-edit\" data-route=\"\u002Forganizing\u002Fclay-edit\">editor\u003C\u002Fa>, Clay asks after \u003Ckbd>o\u003C\u002Fkbd> and \u003Ckbd>r\u003C\u002Fkbd> whether the old address should redirect to the new one: \u003Ckbd>y\u003C\u002Fkbd> adds it, \u003Ckbd>n\u003C\u002Fkbd> moves without, \u003Ckbd>Esc\u003C\u002Fkbd> cancels. A moved folder redirects every page in it. A page moved back to an address it had drops that address from its redirects.\u003C\u002Fp>\n\u003Ch2 id=\"how-it-works\">\u003Ca class=\"heading-anchor\" href=\"#how-it-works\" aria-label=\"Link to this section\" data-route=\"#how-it-works\">#\u003C\u002Fa>How it works\u003C\u002Fh2>\n\u003Cp>Static hosts like GitHub Pages cannot redirect by themselves, so the build writes a small page at each old address. It sends the browser on at once, keeps the \u003Ccode>#section\u003C\u002Fcode>, and tells search engines the page’s real address. Old addresses are not in the sitemap or the search.\u003C\u002Fp>\n\u003Ch2 id=\"links-in-your-docs\">\u003Ca class=\"heading-anchor\" href=\"#links-in-your-docs\" aria-label=\"Link to this section\" data-route=\"#links-in-your-docs\">#\u003C\u002Fa>Links in your docs\u003C\u002Fh2>\n\u003Cp>Redirects are for links from elsewhere. A link in your own docs that points to an old address still works, but the build reports it, so that it can point to the page directly:\u003C\u002Fp>\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\">\u003Cspan style=\"--shiki-light:#000000;--shiki-dark:#D4D4D4\">▲ Broken link in index.md: \"setup.md\" points to an old address of \u002Fguides\u002Fsetup; link to the page itself\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\u003Cdiv class=\"markdown-alert markdown-alert-note\">\n\u003Cp class=\"markdown-alert-title text-base-content\">\u003Ci class=\"fa-solid fa-sticky-note mr-2\">\u003C\u002Fi>Note\u003C\u002Fp>\n\u003Cp>Each redirect is a tiny file in the build. Keep them as long as old links may be around; for addresses that were public, that is usually for good.\u003C\u002Fp>\n\u003C\u002Fdiv>\n",[6,10,13,16],{"id":7,"text":8,"level":9},"addresses","Addresses",2,{"id":11,"text":12,"level":9},"moving-pages-with-clay-edit","Moving pages with clay edit",{"id":14,"text":15,"level":9},"how-it-works","How it works",{"id":17,"text":18,"level":9},"links-in-your-docs","Links in your docs","Keep old addresses working when a page moves or gets a new name, for bookmarks, search engines and links from other sites.",null,false,"\u002F_clay\u002Fsocial\u002Forganizing\u002Fredirects.png",1792666370135]