Skip to content

Add unique SEO metadata to feed detail map pages#79

Merged
Alessandro100 merged 2 commits intomainfrom
copilot/improve-feed-detail-map-metadata
May 7, 2026
Merged

Add unique SEO metadata to feed detail map pages#79
Alessandro100 merged 2 commits intomainfrom
copilot/improve-feed-detail-map-metadata

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 23, 2026

The /feeds/[type]/[id]/map route was being indexed by Google with the site's generic homepage title and unrelated description — neither page had a generateMetadata export.

Changes

  • Feed.functions.tsx — Two new functions:

    • generateMapPageTitle: appends "Map" into the feed-specific title segment (e.g. "Provider GTFS Schedule Feed Map - Mobility Database")
    • generateMapDescriptionMetaTag: uses a new feeds.mapPageDescription i18n key describing the interactive map view
  • messages/en.json + messages/fr.json — New key:

    "mapPageDescription": "Explore the {formattedName} {dataTypeVerbose} feed on an interactive map showing routes, stops, and transit coverage."
    
  • generate-feed-metadata.ts — New generateMapFeedMetadata() mirroring generateFeedMetadata() but using the map title/description and pointing canonical/OG URLs to .../map

  • authed/map/page.tsx + static/map/page.tsx — Added generateMetadata exports that fetch feed data (reusing the existing per-request cache) and delegate to generateMapFeedMetadata()

  • Feed.spec.tsx — Unit tests for both new generator functions covering GTFS, GTFS-RT, GBFS, and empty-provider edge cases

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • download.cypress.io
    • Triggering command: /opt/hostedtoolcache/node/24.14.0/x64/bin/node /opt/hostedtoolcache/node/24.14.0/x64/bin/node index.js --exec install (dns block)
    • Triggering command: /opt/hostedtoolcache/node/24.14.0/x64/bin/node /opt/hostedtoolcache/node/24.14.0/x64/bin/node dist/index.js --exec install (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Improve metadata of feed detail map pages</issue_title>
<issue_description>The map page in feed details has been seen to be indexed on google, but it does not have the same unique title and description as the feed detail page.

Task: Assure that the feed detail map page has a unique title and description to better describe the page

Image</issue_description>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mobilitydatabase-web Ready Ready Preview, Comment May 7, 2026 0:59am

Request Review

Copilot AI changed the title [WIP] Update feed detail map page with unique title and description Add unique SEO metadata to feed detail map pages Mar 23, 2026
Copilot AI requested a review from Alessandro100 March 23, 2026 12:48
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copilot AI and others added 2 commits May 7, 2026 08:58
- Add generateMapPageTitle and generateMapDescriptionMetaTag to Feed.functions.tsx
- Add mapPageDescription translation key to en.json and fr.json
- Add generateMapFeedMetadata to generate-feed-metadata.ts with map-specific canonical URL
- Add generateMetadata export to authed/map/page.tsx and static/map/page.tsx
- Add unit tests for new title and description functions

Co-authored-by: Alessandro100 <18631060+Alessandro100@users.noreply.github.com>
Agent-Logs-Url: https://github.com/MobilityData/mobilitydatabase-web/sessions/bb3c0799-e6bf-491c-a0a8-a37dbc5fec2e
Copy link
Copy Markdown
Contributor

@Alessandro100 Alessandro100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested and works

Image

@Alessandro100 Alessandro100 marked this pull request as ready for review May 7, 2026 13:26
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

*Lighthouse ran on https://mobilitydatabase-5bsw3sqo3-mobility-data.vercel.app/ * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🟢 100 🟢 94 🟢 96 🟢 100

*Lighthouse ran on https://mobilitydatabase-5bsw3sqo3-mobility-data.vercel.app/feeds * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🟠 84 🟠 87 🟢 96 🟢 100

*Lighthouse ran on https://mobilitydatabase-5bsw3sqo3-mobility-data.vercel.app/feeds/gtfs/mdb-2126 * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🔴 43 🟢 94 🟢 96 🟢 100

*Lighthouse ran on https://mobilitydatabase-5bsw3sqo3-mobility-data.vercel.app/feeds/gtfs_rt/mdb-2585 * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🟢 95 🟠 84 🟢 96 🟢 100

*Lighthouse ran on https://mobilitydatabase-5bsw3sqo3-mobility-data.vercel.app/feeds/gbfs/gbfs-flamingo_porirua * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🟢 98 🟢 94 🟢 96 🟢 100

@Alessandro100 Alessandro100 merged commit 4a474e1 into main May 7, 2026
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve metadata of feed detail map pages

4 participants