Add unique SEO metadata to feed detail map pages#79
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
- 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
6c5ea84 to
44da60f
Compare
|
*Lighthouse ran on https://mobilitydatabase-5bsw3sqo3-mobility-data.vercel.app/ * (Desktop)
*Lighthouse ran on https://mobilitydatabase-5bsw3sqo3-mobility-data.vercel.app/feeds * (Desktop)
*Lighthouse ran on https://mobilitydatabase-5bsw3sqo3-mobility-data.vercel.app/feeds/gtfs/mdb-2126 * (Desktop)
*Lighthouse ran on https://mobilitydatabase-5bsw3sqo3-mobility-data.vercel.app/feeds/gtfs_rt/mdb-2585 * (Desktop)
*Lighthouse ran on https://mobilitydatabase-5bsw3sqo3-mobility-data.vercel.app/feeds/gbfs/gbfs-flamingo_porirua * (Desktop)
|

The
/feeds/[type]/[id]/maproute was being indexed by Google with the site's generic homepage title and unrelated description — neither page had agenerateMetadataexport.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 newfeeds.mapPageDescriptioni18n key describing the interactive map viewmessages/en.json+messages/fr.json— New key:generate-feed-metadata.ts— NewgenerateMapFeedMetadata()mirroringgenerateFeedMetadata()but using the map title/description and pointing canonical/OG URLs to.../mapauthed/map/page.tsx+static/map/page.tsx— AddedgenerateMetadataexports that fetch feed data (reusing the existing per-request cache) and delegate togenerateMapFeedMetadata()Feed.spec.tsx— Unit tests for both new generator functions covering GTFS, GTFS-RT, GBFS, and empty-provider edge casesWarning
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/opt/hostedtoolcache/node/24.14.0/x64/bin/node /opt/hostedtoolcache/node/24.14.0/x64/bin/node index.js --exec install(dns block)/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
🔒 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.