Needs a static export
How to publish a Nextra site as a static export
Nextra is a Next.js site, so it renders on a server until you switch it to a static export. Two config keys do that, and its own guide names both.
Choosing a host rather than a command? Next.js Hosting covers what it costs and what does not work here.
- Build command
- npm run build
- Folder to upload
- out
Free plan, free SSL, no credit card.
-
Build the project
Run npm run build in the project folder. This is the step Droply does not do for you: we publish finished pages, we never run your build.
-
Find the output folder
The build writes a finished site to out. That folder, not the project folder, is what gets uploaded.
-
Drag it in
Drop the folder (or a ZIP of it) into Droply. It is live on an HTTPS droply.id subdomain in seconds, and re-uploading publishes a new version at the same URL.
Worth knowing about Nextra
Add
output: "export"ANDimages: { unoptimized: true }to next.config.mjs. the Nextra static-export guide lists both as required, and the second one is the one people miss: without it the build fails on the image optimizer rather than on anything you wrote.The static site lands in
out, not.next.distDircan move it.If your site uses Pagefind search, its postbuild script has to write into the exported folder. the Nextra guide gives the exact command; a search box that returns nothing on a published site is usually this.
Did an AI tool build this project?
Hosting an AI-generated website covers the question that comes before the build command: whether what you are holding is a single file or a project, and which of the two every tool actually hands back.