1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4244],{7249:function(e,i,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/framework-guides/hugo",function(){return s(7282)}])},7282:function(e,i,s){"use strict";s.r(i),s.d(i,{useTOC:function(){return l}});var n=s(4512),d=s(8542),t=s(6827),h=s(266),r=s(7641);function l(e){return[{value:"Prepare the source",id:"prepare-the-source",depth:2},{value:"Check build dependencies",id:"check-build-dependencies",depth:2},{value:"Build locally and deploy",id:"build-locally-and-deploy",depth:2},{value:"Verify the deployed site",id:"verify-the-deployed-site",depth:2}]}i.default=(0,d.c)(function(e){let{toc:i=l(e)}=e,s={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",span:"span",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,h.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.h1,{children:"Deploy Hugo on Lizard"}),"\n",(0,n.jsxs)(s.p,{children:["Lizard can build a Hugo source site with ",(0,n.jsx)(s.code,{children:"hugo --m
1inify"})," and serve ",(0,n.jsx)(s.code,{children:"public/"})," through nginx on port ",(0,n.jsx)(s.code,{children:"80"}),". Start from the Hugo source directory, with a Hugo configuration and ",(0,n.jsx)(s.code,{children:"content/"}),", rather than uploading only the generated HTML."]}),"\n",(0,n.jsxs)(s.p,{children:["Start with the ",(0,n.jsx)(s.a,{href:"https://github.com/lizard-build/docs/tree/main/_examples/hugo",children:"complete source example"}),", which includes the configuration and files used by this recipe."]}),"\n",(0,n.jsx)(s.h2,{id:i[0].id,children:i[0].value}),"\n",(0,n.jsxs)(s.p,{children:["Include your Hugo config, content, layouts, assets, and all theme files needed by the build. The Hugo detector looks for configuration such as ",(0,n.jsx)(s.code,{children:"hugo.toml"}),", ",(0,n.jsx)(s.code,{children:"hugo.yaml"}),", or ",(0,n.jsx)(s.code,{children:"config/_default/"})," plus a ",(0,n.jsx)(s.code,{children:"content/"})," directory."]}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Setting"}),(0,n.jsx)(s.th,{children:"Value"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:"Build"}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"hugo --minify"})})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:"Output"}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"public/"})})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:"Production server"}),(0,n.jsx)(s.td,{children:"nginx"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:"Service port"}),(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"80"})})]})]})]}),"\n",(0,n.jsxs)(s.p,{children:["Set ",(0,n.jsx)(s.code,{children:"baseURL"})," to the intended public site URL, including its trailing slash. Rebuild after assigning a different hostname so links and generated sitemap entries use it. Check ",(0,n.jsx)(s.a,{href:"https://gohugo.io/getting-started/usage/",children:"Hugoâs build and output guide"}),"."]}),"\n",(0,n.jsx)(s.h2,{id:i[1].id,children:i[1].value}),"\n",(0,n.jsxs)(s.p,{children:["The default Hugo build image is ",(0,n.jsx)(s.code,{children:"hugomods/hugo:base"}),"; it does not pin a Hugo version for your project. If a theme needs a particular Hugo version, the extended edition, or Node tooling, use a complete Dockerfile with those dependencies and the version you tested."]}),"\n",(0,n.jsxs)(s.p,{children:["A Hugo config and ",(0,n.jsx)(s.code,{children:"content/"})," select the Hugo builder before Go or Node detection. Hugo Modules projects with ",(0,n.jsx)(s.code,{children:"go.mod"})," use a build image with Go support. A ",(0,n.jsx)(s.code,{children:"package.json"})," causes the build to stop with a request for a Dockerfile: install the Node dependencies, build the assets, then run ",(0,n.jsx)(s.code,{children:"hugo --minify"}),". See ",(0,n.jsx)(s.a,{href:"/concepts/build-pipeline#build-decision-order",children:"build decision order"}),"."]}),"\n",(0,n.jsx)(s.h2,{id:i[2].id,children:i[2].value}),"\n",(0,n.jsx)(s.pre,{icon:r.Fx,tabIndex:"0","data-language":"bash","data-word-wrap":"",children:(0,n.jsxs)(s.code,{children:[(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:"hugo"}),(0,n.jsx)(s.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:" --minify"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:"hugo"}),(0,n.jsx)(s.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" server"})]})]})}),"\n",(0,n.jsxs)(s.p,{children:["Inspect ",(0,n.jsx)(s.code,{children:"public/"})," after the first command. Use the local server to check content and theme rendering; ",(0,n.jsx)(s.code,{children:"hugo server"})," is not the production start command."]}),"\n",(0,n.jsxs)(s.p,{children:["After ",(0,n.jsx)(s.a,{href:"/framework-guides#prepare-the-project",children:"CLI setup"}),", deploy the source directory:"]}),"\n",(0,n.jsx)(s.pre,{icon:r.Fx,tabIndex:"0","data-language":"bash","data-word-wrap":"",children:(0,n.jsxs)(s.code,{children:[(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:"lizard"}),(0,n.jsx)(s.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" init"}),(0,n.jsx)(s.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:" --name"}),(0,n.jsx)(s.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" hugo-site"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:"lizard"}),(0,n.jsx)(s.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" add"}),(0,n.jsx)(s.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:" --service"}),(0,n.jsx)(s.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" web"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:"lizard"}),(0,n.jsx)(s.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" up"}),(0,n.jsx)(s.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:" --service"}),(0,n.jsx)(s.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" web"}),(0,n.jsx)(s.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:" --port"}),(0,n.jsx)(s.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:" 80"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:"lizard"}),(0,n.jsx)(s.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" logs"}),(0,n.jsx)(s.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:" --build"}),(0,n.jsx)(s.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:" --service"}),(0,n.jsx)(s.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" web"}),(0,n.jsx)(s.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:" --json"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:"lizard"}),(0,n.jsx)(s.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" ps"}),(0,n.jsx)(s.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:" --json"})]})]})}),"\n",(0,n.jsx)(s.p,{children:"If you use the generated hostname, read it after the first deploy:"}),"\n",(0,n.jsx)(s.pre,{icon:r.Fx,tabIndex:"0","data-language":"bash","data-word-wrap":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:"lizard"}),(0,n.jsx)(s.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" service"}),(0,n.jsx)(s.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" show"}),(0,n.jsx)(s.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" web"}),(0,n.jsx)(s.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:" --json"})]})})}),"\n",(0,n.jsxs)(s.p,{children:["Set ",(0,n.jsx)(s.code,{children:"baseURL"})," in ",(0,n.jsx)(s.code,{children:"hugo.toml"})," to that hostname:"]}),"\n",(0,n.jsx)(s.pre,{tabIndex:"0","data-language":"toml","data-word-wrap":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-dark":"#858B94","--shiki-light":"#03070E"},children:"baseURL"}),(0,n.jsx)(s.span,{style:{"--shiki-dark":"#858B94","--shiki-light":"#03070E"},children:" ="}),(0,n.jsx)(s.span,{style:{"--shiki-dark":"#858B94","--shiki-light":"#03070E"},children:' "'}),(0,n.jsx)(s.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:"https://YOUR_PUBLIC_HOST/"}),(0,n.jsx)(s.span,{style:{"--shiki-dark":"#858B94","--shiki-light":"#03070E"},children:'"'})]})})}),"\n",(0,n.jsx)(s.p,{children:"Upload the changed config so the build uses the public URL:"}),"\n",(0,n.jsx)(s.pre,{icon:r.Fx,tabIndex:"0","data-language":"bash","data-word-wrap":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:"lizard"}),(0,n.jsx)(s.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" up"}),(0,n.jsx)(s.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:" --service"}),(0,n.jsx)(s.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" web"}),(0,n.jsx)(s.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:" --port"}),(0,n.jsx)(s.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:" 80"})]})})}),"\n",(0,n.jsx)(s.p,{children:"Exclude local generated output and secrets. For an upload, ensure theme source files actually exist in the directory you send; a remote submodule reference alone is not the theme content."}),"\n",(0,n.jsx)(s.h2,{id:i[3].id,children:i[3].value}),"\n",(0,n.jsxs)(s.p,{children:["Open the live home page, an inner article, and an image. Check the generated canonical URLs and ",(0,n.jsx)(s.code,{children:"sitemap.xml"}),". Test a made-up pathâs HTTP status. New Hugo builds serve the generated HTML and return HTTP 404 for missing pages. No custom Dockerfile is needed for the simple source layout in this guide. Rebuild older images to pick up the current routing rules."]}),"\n",(0,n.jsxs)(s.p,{children:["Use ",(0,n.jsx)(s.a,{href:"/framework-guides/static-routing",children:"static routes and 404s"})," if you need a custom nginx policy. A custom Hugo build stage must include the themeâs required Hugo version and tools, run ",(0,n.jsx)(s.code,{children:"hugo --minify"}),", and copy ",(0,n.jsx)(s.code,{children:"public/"})," into the serving image."]}),"\n",(0,n.jsxs)(s.p,{children:["If theme assets are missing, inspect the build logs, theme source, and ",(0,n.jsx)(s.code,{children:"baseURL"}),". If the wrong builder starts, check that the Hugo config and ",(0,n.jsx)(s.code,{children:"content/"})," are in the upload root and inspect existing service overrides. Hugo produces static files, so content changes need a new build."]}),"\n",(0,n.jsxs)(s.p,{children:["See ",(0,n.jsx)(s.a,{href:"/framework-guides/validation",children:"tested versions and cloud results"})," for the September 9, 2026 deployment checks and their limits."]})]})},"/framework-guides/hugo",{filePath:"pages/framework-guides/hugo.mdx",pageMap:t.v,frontMatter:{description:"Deploy Hugo on Lizard by building public with hugo --minify and serving it on port 80. Check detection, themes, baseURL, generated routes, and missing-page status."},title:"Deploy Hugo on Lizard"},"undefined"==typeof RemoteContent?l:RemoteContent.useTOC)}},function(e){e.O(0,[8542,6827,2888,9774,179],function(){return e(e.s=7249)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.