import type { Metadata } from 'next'; export const SITE_URL = 'https://jotley.ai'; export const OG_IMAGE_PATH = '/og/jotley-v2.png'; const imageOrigin = (process.env.VERCEL_ENV ?? process.env.CLOUDFLARE_DEPLOYMENT_ENV) === 'preview' && process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}` : SITE_URL; export const SITE_PAGES = { home: { path: '/', title: 'Jotley — Free AI Voice Notes for Mac, iPhone & iPad', description: 'Free voice notes and summaries with on-device Apple Intelligence. Record, summarize and organize your notes on Mac, iPhone and iPad.', }, download: { path: '/download', title: 'Download Jotley for Mac — Free App & Installation Guide', description: 'Download the free, signed and notarized Jotley Mac app. Follow the installation guide to start transcribing and summarizing with Apple Intelligence.', }, mcp: { path: '/mcp', title: 'Jotley MCP for Mac — Connect Claude Code & Codex', description: 'Connect the Claude Code and Codex Mac apps to Jotley. Read and edit notes, manage tags and folders, and use custom summary templates with access you control.', }, support: { path: '/help', title: 'Jotley Help — FAQs & Guides', description: 'Find answers about Jotley, on-device Apple Intelligence, live transcription and iCloud sync. Find Jotley tutorials and troubleshooting guides.', }, compare: { path: '/compare', title: "Jotley compared with Otter and Whisper Notes", description: "How Jotley, Otter and Whisper Notes differ: three apps that turn speech into notes, compared on devices, where transcription happens, languages and agent access.", }, tutorials: { path: '/tutorials', title: 'Jotley Tutorials — iPhone, iPad & Mac Video Guides', description: 'Narrated video tutorials for Jotley on iPhone, iPad and Mac: capture a spoken idea, summarize it, ask your notes, and organize, find and share them.', }, privacy: { path: '/privacy', title: 'Jotley Privacy Policy — Your Notes, On Your Device', description: 'How Jotley handles on-device AI, optional iCloud sync, Mac MCP agent access and website analytics. Learn what connected agents can read and change.', }, research: { path: '/research', title: 'Research behind Jotley', description: 'Public research on memory, note taking and dictation, summarized in plain words with links to every source.', }, appNotices: { path: '/app-notices', title: 'Jotley App Notices', description: 'Jotley software license, connected services, and transcript accuracy notices.', }, } as const; export function pageMetadata(page: keyof typeof SITE_PAGES): Metadata { const { path, title, description } = SITE_PAGES[page]; return { title, description, robots: (process.env.VERCEL_ENV ?? process.env.CLOUDFLARE_DEPLOYMENT_ENV) === 'preview' ? { index: false, follow: false } : { index: true, follow: true, googleBot: { 'max-image-preview': 'large' } }, alternates: { canonical: new URL(path, SITE_URL).href }, openGraph: { title, description, url: new URL(path, SITE_URL).href, siteName: 'Jotley', locale: 'en_US', type: 'website', images: [{ url: `${imageOrigin}${OG_IMAGE_PATH}`, width: 1200, height: 630, type: 'image/png', alt: 'Jotley — Every word, captured and understood. Free AI voice notes for Mac, iPhone and iPad, powered by on-device Apple Intelligence.', }], }, twitter: { card: 'summary_large_image', title, description, images: [{ url: `${imageOrigin}${OG_IMAGE_PATH}`, alt: 'Jotley — Free AI voice notes, powered by on-device Apple Intelligence.', }], }, }; }