Recipes
Add a Public Marketing Page
Add a new public page to the marketing site, using shared UI, semantic theme tokens, and centralized destination links.
Add a public page to the marketing site (apps/marketing). The marketing app is
independent of Convex and uses the shared @leavelocalhost/ui package with its
own theme.
1. Create the route
Add a folder and page.tsx under apps/marketing/src/app/. For example a
"Security" page at /security:
apps/marketing/src/app/security/page.tsxCompose the page from shared UI primitives and the marketing section components
in apps/marketing/src/components.
2. Use config for copy and links
- Never hard-code a destination URL in a component. Routes to the app, docs, or
checkout flow through
apps/marketing/src/config/links.ts(backed byNEXT_PUBLIC_APP_URL,NEXT_PUBLIC_DOCS_URL,NEXT_PUBLIC_PURCHASE_URL). - Keep static copy (nav labels, FAQ, pricing) in
apps/marketing/src/config.
3. Add metadata and navigation
- Export
metadata(orgenerateMetadata) using the SEO helpers inapps/marketing/src/lib/seo.tsso the page gets canonical URLs and Open Graph tags. See SEO and Metadata. - Add the page to the site navigation config if it should appear in the header or footer.
4. Preview
bun run dev:marketing # http://localhost:3002Content pages instead?
If you are publishing a blog post or changelog entry rather than a standalone page, use the MDX content system instead — see Blog and Changelog.