Settings
Every setting the site reads, its default, and how to change it with Docker and without.
The settings
Every setting is optional: the site runs without any of them.
| Variable | Default | What it does |
|---|---|---|
NEXT_PUBLIC_SITE_URL | http://localhost:3030 | The public address of the site, with https://. A slash at the end is removed. The canonical links, the links between the two languages, the sitemap, robots.txt, the structured data and the social sharing cards are built from it. Set it to your domain before you go live. |
NEXT_PUBLIC_BUY_URL | empty | When set, a strip at the bottom of every page shows a "Buy This Template" button that opens this address in a new tab. Leave it empty. |
NEXT_PUBLIC_RECAPTCHA_SITE_KEY | empty | A Google reCAPTCHA v2 site key. When set, the form on the home page asks for the "I'm not a robot" checkbox before it sends. Leave it empty for no captcha step. |
BUILD_STANDALONE | empty | true builds a self-contained server into .next/standalone. The Dockerfile sets it for you. Leave it empty for yarn start. |
The port is not a variable: the site always listens on 3030. To use another port, see below.
Without Docker
Copy .env.example to .env.local and edit the values there. Keep .env.example as it is, as the list of what exists.
Publino-templatecp .env.example .env.localNEXT_PUBLIC_SITE_URL=https://www.your-domain.comTo use another port than 3030, pass it to the script: yarn dev -p 3041 or yarn start -p 3041.
With Docker
The image build does not read .env or .env.local files. Pass each value as a build argument instead:
Publino-templatedocker build -t publino-landing --build-arg NEXT_PUBLIC_SITE_URL=https://www.your-domain.com .The site inside the container always listens on port 3030. To use another port on your computer, change the number on the left of -p when you start it: docker run -p 3041:3030 publino-landing.
When a change takes effect
Values that start with NEXT_PUBLIC_ are compiled into the JavaScript the browser loads when the site is built. Changing one changes nothing until the site is built again:
| How you run it | After changing a value |
|---|---|
yarn dev | Stop the server and run yarn dev again. |
yarn build and yarn start | Run yarn build again, then yarn start. |
| Docker | Build the image again with the value as a --build-arg, then start a new container. |
| Vercel | Change it in the project's Environment Variables and deploy again. |
Never put a secret in a NEXT_PUBLIC_ value: every visitor can read it in the page's code. The reCAPTCHA site key is meant to be public; its secret key belongs on your server.
The standalone build
With BUILD_STANDALONE=true, yarn build writes a server that needs no node_modules into .next/standalone. The Dockerfile uses it to keep the image small. yarn start is not meant for that kind of build and warns "next start" does not work with "output: standalone" configuration. Leave the variable empty unless you copy the standalone folder to a server yourself.
Settings in the code
A few values that are not texts live in src/config/site.config.ts: the author name in the page metadata, the sharing image and its size, and the social profiles listed for search engines. Empty profiles are left out.