Skip to content

Add per-city landing pages generated from the places dataset #127

Description

@AnayDhawan

Problem

We hold places for hundreds of cities, but there is only one indexable page for all of them. Someone searching for "SAT exam centre in Pune" finds nothing from us, even though the answer is sitting in data/places/sat_centre.json.

Where to start

  • data/places/*.json - one file per category, every record has a city field
  • data/places.schema.json - the record shape
  • Build the route at src/app/city/[slug]/page.tsx

What to build

A statically generated page per city, listing that city's places grouped by category.

Derive the slug from the existing city field. Please do not introduce a second city list or a separate slug mapping file; the dataset should stay the single source of truth.

Use generateStaticParams so the pages prerender at build time.

Put the city name in the <title>, the <h1> and the meta description. Link each place through to its map deep link (see #118).

Thin cities matter here. A city with two entries should still read as a real page, so include a short prompt to contribute more places for that city rather than leaving a near-empty page.

Acceptance criteria

  • A page exists for every distinct city in the dataset
  • Cities whose names collide after slugification are handled, not silently merged
  • Each page lists that city's places grouped by category
  • Title, h1 and meta description all contain the city name
  • Pages are static in the build output, not server-rendered per request
  • npm run validate still passes

Verifying

npm install
npm run build   # confirm the city routes appear as prerendered
npm run dev

Scope: medium to large, roughly 4 hours.

New to the repo? Start with CONTRIBUTING.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is welcomeseoSearch and discoverability

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions