Skip to content

Folio / Docs

Configuration

All settings are environment variables. In Vercel: your project > Settings > Environment Variables. After changing one, open Deployments, click the three dots on the latest deployment and choose Redeploy. In INSTALL.md the six required ones are explained step by step.

VariableNeeded?What it does
NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY, SUPABASE_SERVICE_ROLE_KEYYesConnect the site to your database.
SETUP_TOKENFirst setup onlyLets you create the owner account at /setup. Remove it afterwards.
CRON_SECRETYesProtects the daily maintenance job.
NEXT_PUBLIC_SITE_URLYesYour site address, used in email links.
CANONICAL_HOST, REDIRECT_HOSTSNoSend other addresses to your main one (see Domains below).
RESEND_API_KEY, CONTACT_FROM, CONTACT_TONoEmail.
NEXT_PUBLIC_TURNSTILE_SITE_KEY, TURNSTILE_SECRET_KEYNoSpam check.
DEMO_MODE, DEMO_EMAIL, DEMO_PASSWORD, DEMO_RESET_SECRETNoPublic demo (see Demo site below).
FOLIO_UPDATE_REPONoUpdate check.

Domains: one address for your site

Visitors can reach a site under several addresses (www.yourdomain.com, yourdomain.com, my-site.vercel.app). Search engines treat each as a separate copy. To avoid that, choose one main address and send the others to it:

CANONICAL_HOST=yourdomain.com
REDIRECT_HOSTS=www.yourdomain.com,my-site.vercel.app

Use host names only, without https://. REDIRECT_HOSTS is a comma-separated list. If CANONICAL_HOST is empty nothing is redirected. Preview deployments on other addresses are not affected. Also set NEXT_PUBLIC_SITE_URL=https://yourdomain.com.

Region

vercel.json has no regions line, so Vercel picks its default. To make pages that read the database faster, set Settings > Functions > Function Region in Vercel to the region closest to your Supabase project. Developers can instead add "regions": ["fra1"] to vercel.json.

Email (Resend)

  1. Create an API key at resend.com and set RESEND_API_KEY.
  2. In Resend > Domains, add and verify your domain, then set CONTACT_FROM to an address on it, for example CONTACT_FROM="Your Name <contact@example.com>". Until the domain is verified, Resend only delivers to your own Resend account email.
  3. Set CONTACT_TO to the inbox that should receive contact messages.

Email powers contact notifications, replies from the inbox, newsletters, new-post emails and chat alerts.

Turnstile (spam check)

Create a widget at dash.cloudflare.com > Turnstile (mode Managed). Set both NEXT_PUBLIC_TURNSTILE_SITE_KEY and TURNSTILE_SECRET_KEY and redeploy. With only one of them, or neither, the contact and subscribe forms rely on a honeypot field and the rate limit.

Demo mode

Set DEMO_MODE=1 to publish a read-only copy of the admin.

  • The proxy answers 403 to every POST, PUT, PATCH and DELETE under /admin except on /admin/login and /admin/login/verify. That covers server actions, no-JavaScript form posts and route handlers.
  • /admin/backup and every .../export download are blocked, including GET.
  • GET pages work as usual, and a banner reads "Demo mode: changes are disabled".
  • If DEMO_EMAIL and DEMO_PASSWORD are also set, the login page shows them. They are shown only while DEMO_MODE=1.

Use a separate Supabase project with sample data and an editor account for the demo. Do not point a demo at real data. Signing out is a server action, so it is also refused in demo mode; a visitor leaves by closing the browser or clearing cookies. Public forms (contact, subscribe, chat) still work on the public site, so disable or moderate them on a demo.

Update checker

Set FOLIO_UPDATE_REPO=owner/repo. Settings > About this CMS (owner only) then compares the installed version with the latest GitHub release of that repository, using its tag (for example v0.2.0). The result is cached for an hour. If GitHub cannot be reached, the page says "Could not check for updates". Leave the variable empty to turn the check off.

Theme presets and custom CSS

Settings > Design (owner only):

  • Pick a preset (Default, Ocean, Forest, Sunset, Graphite, Rose). This only fills the fields; press Save theme to apply it. Forest and Sunset also add a small background tint as CSS variables, which replaces the contents of the Custom CSS box.
  • Choose your own light and dark accent colours, as #rrggbb.
  • Custom CSS applies to every public page, up to 20,000 characters. It may not contain <. Override variables such as --bg, --surface, --fg and --line, or restyle any class.

Changes appear on the public site within seconds.

Demo site

A public demo is a second deployment of Folio with its own Supabase project (never real data), reset every hour.

  1. Create a new Supabase project, run supabase/folio.sql in it, and deploy Folio again to Vercel with that project's keys.
  2. Add these variables to the demo deployment:
    • DEMO_MODE=1
    • DEMO_EMAIL and DEMO_PASSWORD (12+ characters): the demo editor account that visitors may use. It is created for you and its password is reset on every run. If an account with that email exists and is not an editor, the reset refuses to touch it.
    • DEMO_RESET_SECRET: a random value of 24+ characters.
  3. In the demo's GitHub repository add Settings > Secrets and variables > Actions: variable DEMO_URL (the demo address, no slash at the end) and secret DEMO_RESET_SECRET (the same value). The workflow .github/workflows/demo-reset.yml, if you keep it, then calls the reset every hour. Without DEMO_URL it does nothing.

POST /api/demo/reset with the header Authorization: Bearer <DEMO_RESET_SECRET> deletes and re-creates the sample posts (one draft), a page, inbox messages, subscribers, chat conversations, events with registrations, booking times with one pending booking, a resource without a file and about 600 analytics page views from the last 30 days, and clears the editable site content. It refuses to run unless DEMO_MODE=1, the secret is set and correct, and the database is not the seller's own protected project. Other admin accounts are never touched.

Search engines (SEO)

Folio does the technical SEO for you: a sitemap with real "last changed" dates, robots.txt, canonical addresses, share cards, structured data (person, articles, events, breadcrumbs), RSS and llms.txt. Empty list pages (no events, resources, booking times or testimonials yet) stay out of search results until they have something to show.

Do this once after you launch:

  1. Open Google Search Console, add your site with the "URL prefix" option and copy the code from the HTML tag method. Paste it in Admin > Site content > Profile and SEO > Search engine verification, save, then click Verify in Search Console.
  2. In Search Console, open Sitemaps and enter sitemap.xml.
  3. Open Bing Webmaster Tools and choose Import from Google Search Console. Bing also powers ChatGPT search and Copilot.

IndexNow tells Bing, Yandex and others about a new or changed post straight away. It turns on by itself when CRON_SECRET is set (set INDEXNOW_KEY to pin your own key). Google does not use IndexNow; it reads your sitemap.

Admin > SEO shows the site checklist, every main page's search title and description, and a score for each post with what to fix first. While you write, the SEO assistant under the editor scores the post as you type: pick a focus keyword, check the Google preview, and apply the suggested description, slug or tags with one click.