Leave Localhost logoLeave LocalhostDocs
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.tsx

Compose the page from shared UI primitives and the marketing section components in apps/marketing/src/components.

  • 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 by NEXT_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 (or generateMetadata) using the SEO helpers in apps/marketing/src/lib/seo.ts so 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:3002

Content 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.

On this page