[{"data":1,"prerenderedAt":20},["ShallowReactive",2],{"clay-page:\u002Fpublishing":3},{"html":4,"toc":5,"description":16,"hero":17,"list":18,"socialImage":19},"\u003Ch1 id=\"publishing\">Publishing\u003C\u002Fh1>\n\u003Cp>A Clay build is a folder of static files: there is no server to run, and any host that serves files can serve a Clay site.\u003C\u002Fp>\n\u003Cdiv class=\"clay-cards not-prose\">\u003Ca class=\"clay-card\" href=\"\u002Fclay-example-repo\u002Fpublishing\u002Fcommands\" data-route=\"\u002Fpublishing\u002Fcommands\">\u003Ci class=\"clay-card-icon fa-solid fa-terminal\" aria-hidden=\"true\">\u003C\u002Fi>\u003Cspan class=\"clay-card-title\">Commands\u003C\u002Fspan>\u003Cspan class=\"clay-card-text\">Every clay command and option, from the live preview to building, previewing, searching, editing and saving versions.\u003C\u002Fspan>\u003C\u002Fa>\u003Ca class=\"clay-card\" href=\"\u002Fclay-example-repo\u002Fpublishing\u002Fbuild-checks\" data-route=\"\u002Fpublishing\u002Fbuild-checks\">\u003Ci class=\"clay-card-icon fa-solid fa-list-check\" aria-hidden=\"true\">\u003C\u002Fi>\u003Cspan class=\"clay-card-title\">Build Checks\u003C\u002Fspan>\u003Cspan class=\"clay-card-text\">The problems clay build reports, how --strict turns them into errors, and what to do when a build fails.\u003C\u002Fspan>\u003C\u002Fa>\u003Ca class=\"clay-card\" href=\"\u002Fclay-example-repo\u002Fpublishing\u002Fgithub-pages\" data-route=\"\u002Fpublishing\u002Fgithub-pages\">\u003Ci class=\"clay-card-icon fa-brands fa-github\" aria-hidden=\"true\">\u003C\u002Fi>\u003Cspan class=\"clay-card-title\">GitHub Pages\u003C\u002Fspan>\u003Cspan class=\"clay-card-text\">Publish a Clay site on GitHub Pages with a workflow that checks and deploys the docs on every push.\u003C\u002Fspan>\u003C\u002Fa>\u003Ca class=\"clay-card\" href=\"\u002Fclay-example-repo\u002Fpublishing\u002Fother-hosts\" data-route=\"\u002Fpublishing\u002Fother-hosts\">\u003Ci class=\"clay-card-icon fa-solid fa-server\" aria-hidden=\"true\">\u003C\u002Fi>\u003Cspan class=\"clay-card-title\">Other Hosts\u003C\u002Fspan>\u003Cspan class=\"clay-card-text\">Deploy a Clay site to Netlify, Cloudflare Pages, GitLab Pages or your own web server.\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fdiv>\n\u003Ch2 id=\"from-your-docs-to-the-web\">\u003Ca class=\"heading-anchor\" href=\"#from-your-docs-to-the-web\" aria-label=\"Link to this section\" data-route=\"#from-your-docs-to-the-web\">#\u003C\u002Fa>From your docs to the web\u003C\u002Fh2>\n\u003Cdiv class=\"clay-steps\">\u003Col>\n\u003Cli>\u003Cstrong>Preview while you write\u003C\u002Fstrong> with \u003Ccode>npx clay dev\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Build and check\u003C\u002Fstrong> with \u003Ccode>npx clay build --strict\u003C\u002Fcode>. Broken links and typos in the settings stop the build.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Look at the result\u003C\u002Fstrong> with \u003Ccode>npx clay preview\u003C\u002Fcode>, the way a web host serves it.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Publish \u003Ccode>publish\u002Fpublic\u003C\u002Fcode>\u003C\u002Fstrong>, best by a workflow on every push, see \u003Ca href=\"\u002Fclay-example-repo\u002Fpublishing\u002Fgithub-pages\" data-route=\"\u002Fpublishing\u002Fgithub-pages\">GitHub Pages\u003C\u002Fa> or \u003Ca href=\"\u002Fclay-example-repo\u002Fpublishing\u002Fother-hosts\" data-route=\"\u002Fpublishing\u002Fother-hosts\">other hosts\u003C\u002Fa>.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003C\u002Fdiv>\n\u003Ch2 id=\"where-to-host\">\u003Ca class=\"heading-anchor\" href=\"#where-to-host\" aria-label=\"Link to this section\" data-route=\"#where-to-host\">#\u003C\u002Fa>Where to host\u003C\u002Fh2>\n\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Host\u003C\u002Fth>\n\u003Cth>Cost\u003C\u002Fth>\n\u003Cth>Set up in\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\u003Ctr>\n\u003Ctd>\u003Ca href=\"\u002Fclay-example-repo\u002Fpublishing\u002Fgithub-pages\" data-route=\"\u002Fpublishing\u002Fgithub-pages\">GitHub Pages\u003C\u002Fa>\u003C\u002Ftd>\n\u003Ctd>Free for public repositories\u003C\u002Ftd>\n\u003Ctd>A workflow file, see the guide\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ca href=\"\u002Fclay-example-repo\u002Fpublishing\u002Fother-hosts#hosting-services\" data-route=\"\u002Fpublishing\u002Fother-hosts#hosting-services\">Netlify, Cloudflare Pages\u003C\u002Fa>\u003C\u002Ftd>\n\u003Ctd>Free plans\u003C\u002Ftd>\n\u003Ctd>The host’s build settings\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ca href=\"\u002Fclay-example-repo\u002Fpublishing\u002Fother-hosts#hosting-services\" data-route=\"\u002Fpublishing\u002Fother-hosts#hosting-services\">GitLab Pages\u003C\u002Fa>\u003C\u002Ftd>\n\u003Ctd>Free\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>.gitlab-ci.yml\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ca href=\"\u002Fclay-example-repo\u002Fpublishing\u002Fother-hosts#your-own-web-server\" data-route=\"\u002Fpublishing\u002Fother-hosts#your-own-web-server\">Your own server\u003C\u002Fa>\u003C\u002Ftd>\n\u003Ctd>Your server\u003C\u002Ftd>\n\u003Ctd>nginx, Caddy or Docker\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\u003C\u002Ftable>\n\u003Ch2 id=\"before-you-go-live\">\u003Ca class=\"heading-anchor\" href=\"#before-you-go-live\" aria-label=\"Link to this section\" data-route=\"#before-you-go-live\">#\u003C\u002Fa>Before you go live\u003C\u002Fh2>\n\u003Cdetails class=\"clay-details collapse\">\u003Csummary class=\"collapse-title\">\u003Cspan class=\"clay-details-icon\" aria-hidden=\"true\">\u003Ci class=\"fa-solid fa-chevron-right\">\u003C\u002Fi>\u003C\u002Fspan>\u003Cspan class=\"clay-details-title\">Does the site live under a path?\u003C\u002Fspan>\u003C\u002Fsummary>\u003Cdiv class=\"collapse-content\">\u003Cp>A site at \u003Ccode>https:\u002F\u002Fmy-org.github.io\u002Fmy-project\u002F\u003C\u002Fcode> needs \u003Ccode>baseURL: \"\u002Fmy-project\u002F\"\u003C\u002Fcode> in \u003Ccode>clay.yaml\u003C\u002Fcode>, or its styles and links break. Check with \u003Ccode>npx clay preview\u003C\u002Fcode>, which serves the site under its \u003Ccode>baseURL\u003C\u002Fcode>.\u003C\u002Fp>\n\u003C\u002Fdiv>\u003C\u002Fdetails>\n\u003Cdetails class=\"clay-details collapse\">\u003Csummary class=\"collapse-title\">\u003Cspan class=\"clay-details-icon\" aria-hidden=\"true\">\u003Ci class=\"fa-solid fa-chevron-right\">\u003C\u002Fi>\u003C\u002Fspan>\u003Cspan class=\"clay-details-title\">Do I want links and dates for search engines?\u003C\u002Fspan>\u003C\u002Fsummary>\u003Cdiv class=\"collapse-content\">\u003Cp>Set \u003Ccode>siteURL\u003C\u002Fcode> to the site’s origin, like \u003Ccode>https:\u002F\u002Fmy-org.github.io\u003C\u002Fcode>: pages then get canonical links, and the build writes a sitemap. See \u003Ca href=\"\u002Fclay-example-repo\u002Ffeatures\u002Fseo\" data-route=\"\u002Ffeatures\u002Fseo\">SEO\u003C\u002Fa>.\u003C\u002Fp>\n\u003C\u002Fdiv>\u003C\u002Fdetails>\n\u003Cdetails class=\"clay-details collapse\">\u003Csummary class=\"collapse-title\">\u003Cspan class=\"clay-details-icon\" aria-hidden=\"true\">\u003Ci class=\"fa-solid fa-chevron-right\">\u003C\u002Fi>\u003C\u002Fspan>\u003Cspan class=\"clay-details-title\">Does CI fetch the full history?\u003C\u002Fspan>\u003C\u002Fsummary>\u003Cdiv class=\"collapse-content\">\u003Cp>Clay takes the last-updated date of each page from git. Most CI systems clone only the last commit; check out the full history to get the dates, see \u003Ca href=\"\u002Fclay-example-repo\u002Ffeatures\u002Fpage-details\" data-route=\"\u002Ffeatures\u002Fpage-details\">page details\u003C\u002Fa>.\u003C\u002Fp>\n\u003C\u002Fdiv>\u003C\u002Fdetails>\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>Run \u003Ccode>npx clay build --strict\u003C\u002Fcode> locally before you push. It takes a few seconds and catches the same problems CI would.\u003C\u002Fp>\n\u003C\u002Fdiv>\n",[6,10,13],{"id":7,"text":8,"level":9},"from-your-docs-to-the-web","From your docs to the web",2,{"id":11,"text":12,"level":9},"where-to-host","Where to host",{"id":14,"text":15,"level":9},"before-you-go-live","Before you go live","The clay commands, the checks every build runs, and how to put the site online on GitHub Pages or any other host.",null,false,"\u002F_clay\u002Fsocial\u002Fpublishing.png",1792666369852]