Next.js (static export)
Next.js can produce a fully static site: just a folder of files, exactly what Bailey needs. That folder is called out.
Turn on static export
Section titled “Turn on static export”-
In
next.config.js, switch on export mode:next.config.js const nextConfig = {output: 'export',};module.exports = nextConfig; -
Build:
Terminal window npm installnpm run build -
An
outfolder appears. That’s the one you upload to Bailey.
Handy details
Section titled “Handy details”- Images: the optimized
next/imagecomponent needs a server. For static, addimages: { unoptimized: true }tonext.config.js. - Internal links: Next handles paths correctly for a site served at the root, which is the case on your Bailey subdomain.
const nextConfig = { output: 'export', images: { unoptimized: true },};module.exports = nextConfig;Still seeing a blank page? → Why your site looks broken.