Add unique meta title and description to each page#80
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: Alessandro100 <18631060+Alessandro100@users.noreply.github.com> Agent-Logs-Url: https://github.com/MobilityData/mobilitydatabase-web/sessions/da9f4d29-6967-4a69-b463-3be59fc6ef9c
src/app/[locale]/about/page.tsx
Outdated
| alternates: { | ||
| canonical: '/about', | ||
| }, | ||
| openGraph: { | ||
| title: 'About | Mobility Database', | ||
| description: | ||
| 'Learn about Mobility Database, the open-source catalog of public transit feeds. Discover our mission to make GTFS, GTFS-RT, and GBFS data accessible to everyone.', | ||
| url: 'https://mobilitydatabase.org/about', | ||
| siteName: 'Mobility Database', | ||
| type: 'website', | ||
| }, |
There was a problem hiding this comment.
@copilot explain why you added the alternates and everyone. section. This applies to the rest of the PR
There was a problem hiding this comment.
The alternates.canonical was added to explicitly declare the canonical URL for each page. Since the app serves the same content at both /about (English default, no prefix) and /fr/about (French), the canonical tag signals to search engines which URL is the primary version, preventing potential duplicate-content penalties.
The openGraph block was added so that when the page URL is shared on social platforms (Slack, Twitter/X, LinkedIn, etc.), they can generate a rich preview with a meaningful title and description instead of falling back to the layout-level defaults.
Both follow the same pattern already established in the home page (src/app/[locale]/page.tsx).
If the issue only requires unique title and description tags (the minimum asked in the issue), the alternates and openGraph blocks can be removed to keep the changes minimal. Let me know if you'd prefer that.
There was a problem hiding this comment.
@copilot remove all the aleternates.canonical tags
There was a problem hiding this comment.
Done — removed alternates.canonical from all 8 pages in commit 8c825b0.
Co-authored-by: Alessandro100 <18631060+Alessandro100@users.noreply.github.com> Agent-Logs-Url: https://github.com/MobilityData/mobilitydatabase-web/sessions/971d0ddf-f8e0-4d5d-a7f1-63ada96c409c
|
|
src/app/[locale]/about/page.tsx
Outdated
| export const dynamic = 'force-static'; | ||
|
|
||
| export const metadata: Metadata = { | ||
| title: 'About | Mobility Database', |
There was a problem hiding this comment.
@copilot change all the title and description from Mobility Database to MobilityDatabase
There was a problem hiding this comment.
Done — updated all title, description, and siteName fields from Mobility Database to MobilityDatabase across all 8 pages in commit fe43d80.
Co-authored-by: Alessandro100 <18631060+Alessandro100@users.noreply.github.com> Agent-Logs-Url: https://github.com/MobilityData/mobilitydatabase-web/sessions/40742f88-10dc-4a3a-ac8d-d51b3072ad35
|
*Lighthouse ran on https://mobilitydatabase-2tv9lxm2y-mobility-data.vercel.app/ * (Desktop)
*Lighthouse ran on https://mobilitydatabase-2tv9lxm2y-mobility-data.vercel.app/feeds * (Desktop)
*Lighthouse ran on https://mobilitydatabase-2tv9lxm2y-mobility-data.vercel.app/feeds/gtfs/mdb-2126 * (Desktop)
*Lighthouse ran on https://mobilitydatabase-2tv9lxm2y-mobility-data.vercel.app/feeds/gtfs_rt/mdb-2585 * (Desktop)
*Lighthouse ran on https://mobilitydatabase-2tv9lxm2y-mobility-data.vercel.app/feeds/gbfs/gbfs-flamingo_porirua * (Desktop)
|
All pages except the home page and feed detail pages fell back to the layout's default metadata, producing duplicate
<title>and<meta name="description">tags across the site.Changes
export const metadata: Metadatato 8 pages that were missing page-level SEO metadata:/about,/contact-us,/contribute-faq,/faq/feeds,/gbfs-validator,/privacy-policy,/terms-and-conditionstitle,description, andopenGraphblockMobilityDatabaseacross all titles, descriptions, andsiteNamefieldsOriginal prompt
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.