Skip to content

feat(competitions): sitemap, OG images and JSON-LD #207

Description

@AnayDhawan

Blocked by #198.

50 competition detail pages are 50 new indexable URLs, and this is the kind of content people search for by name. Give them proper metadata.

Files

  • src/app/sitemap.ts - add competition routes
  • src/app/competitions/[slug]/opengraph-image.tsx - new
  • src/lib/jsonld.ts - extend, it already exists and is tested
  • src/app/competitions/[slug]/page.tsx - wire up generateMetadata

Sitemap

src/app/sitemap.ts already maps over places (:14) and docsNav (:20). Add /competitions and every /competitions/<id>.

Use a real lastModified from verified.on or the most recently changed date in the record. Do not use new Date(). That is precisely the bug open issue #163 exists for on the places side, so do not reproduce it here.

OG images

src/app/city/[slug]/opengraph-image.tsx is the working precedent, including :150-169 where it renders category counts into the image. @vercel/og 1.0.1 is already a dependency.

Per competition: name, organizer, category, next deadline. Keep it legible at thumbnail size, which means a short name and large type rather than the full metadata table.

JSON-LD

src/lib/jsonld.ts exists and has tests at src/lib/jsonld.test.ts. Follow that structure.

Competitions map cleanly onto schema.org Event or, for scholarships, EducationalOccupationalProgram. Include name, description, startDate and endDate from dates[], organizer, url, eventAttendanceMode from format, and isAccessibleForFree from fee.

Only emit dates that are estimated: false. Publishing an estimated date as structured data invites search engines to present a guess as a fact.

Acceptance criteria

  • All 51 routes in the sitemap with real lastModified values
  • Every detail page has a distinct title and description
  • OG image renders and is legible as a thumbnail
  • JSON-LD validates in Google's Rich Results Test
  • Estimated dates excluded from structured data
  • Unit tests extended in src/lib/jsonld.test.ts

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    competitionsCompetitions catalog verticalowner-yashOwned by YashseoSearch and discoverability

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions