Deployment
Nera outputs a plain public/ folder — deploy it anywhere that serves static
files.
Build
npm run build
Host it
- Netlify / Vercel — build command
npm run build, publish directorypublic. - GitHub Pages — build in GitHub Actions and deploy
public/withactions/upload-pages-artifactandactions/deploy-pages, as this site does. - Any static host / CDN — upload the contents of
public/.
Cache busting
Browsers cache stylesheets, scripts and fonts, so after a deploy visitors may
keep seeing the old CSS or JS until they force a reload. Turn on content hashing
in config/app.yaml (requires @nera-static/core 4.11 or newer):
asset_hashing: true
On every build Nera appends ?v=<hash> to each local asset URL — stylesheets,
scripts, images, srcset, the search index and url(…) references inside CSS
such as fonts. The hash comes from the file's content, so a URL changes exactly
when its file does and stays cacheable otherwise. Your templates keep plain
paths like /css/main.css; never add ?v= by hand.
Page links, external URLs and URLs that already have a query string are left
alone, and it works together with base_path. Without the key the build output
is unchanged.
Before you launch
- Set
origininconfig/app.yamlto your real domain so canonical URLs are correct (see Canonical links for SEO). - Add an
.neraignoreat the project root to keep source-only assets out of the build.
public/is deleted and rebuilt on every render — never edit it by hand, and never commit it as source.