docs/ and hosted by Mintlify. The production web app can proxy those docs through Vercel so customers can use either getoverlay.io/docs or docs.getoverlay.io.
Vercel Rewrite
next.config.ts reads this build-time environment variable:
/docs; the app adds the required /docs
upstream path.
When MINTLIFY_DOCS_URL is set, the app adds these routes:
Mintlify Setup
In Mintlify:- Connect the Git repository.
- Set the docs content directory to
docs/. - Enable Host at
/docsin Mintlify forgetoverlay.io. - Use the project’s
*.mintlify.devURL forMINTLIFY_DOCS_URL. The*.mintlify.appURL is for root/custom-subpath proxies and will generate incorrect root-relative navigation links in this setup. - Keep the public docs source in
docs/; internal reports and design assets stay ininternal-docs/.
Vercel Setup
In the Overlay Vercel project:- Add
MINTLIFY_DOCS_URLin Project Settings -> Environment Variables for production and preview as needed. - Ensure
getoverlay.iois attached to the project. - If using
docs.getoverlay.iothrough the same Vercel project, add that domain to the project too. - Deploy the app after the env var is set, because Next.js rewrites are generated at build time.
docs.getoverlay.io is pointed directly at Mintlify instead, do not add it to the Vercel project; configure the CNAME and verification records in Mintlify instead.
Verification
Before deployment:https://getoverlay.io/docsloads the docs home.https://getoverlay.io/docs/start/quickstartloads a nested docs page.https://getoverlay.io/docs/sitemap.xmlandhttps://getoverlay.io/docs/llms.txtresolve.https://docs.getoverlay.ioloads the docs home if that subdomain is attached to Vercel.- The browser URL remains on the Overlay domain instead of redirecting to Mintlify.