Skip to content

Add JSON-LD Place structured data to place cards and city pages #120

Description

@AnayDhawan

Problem

Places on the map are exactly what schema.org calls a Place: they have a name, an address and coordinates, all of which we already store. We emit none of it, so search engines see plain text where they could see structured data.

Where to start

What to build

A JSON-LD <script type="application/ld+json"> block per place, using Place or a more specific subtype where it genuinely fits (Library, GovernmentOffice).

Populate name, address, geo with latitude and longitude, and url pointing at the map deep link.

Only emit fields we actually hold. A field filled with a placeholder is worse than an absent field, and structured data that misrepresents the page can get a site penalised.

Acceptance criteria

  • City pages emit one JSON-LD block per place
  • Every emitted field maps to real data, with no placeholders or invented values
  • Output passes Google's Rich Results Test with no errors
  • Places missing coordinates omit geo rather than emitting nulls

Verifying

npm install
npm run build && npm run start

Paste a city page URL into the Rich Results Test and attach the result to your PR.

Scope: small to medium, roughly 90 minutes. Depends on #127.

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