Skip to content

Enhance opengraph rich preview for changeset, relation, way, node, user pages #2007

@claudiush

Description

@claudiush

Reason:
Changeset, relation, way and node pages are regularly shared on IM and social media channels to discuss, promote or brag about OSM contributions. Right now all of these pages use the same variable "layouts.intro_text" for the OpenGraph description meta tag og:description which is just a general OSM project description: OpenStreetMap is a map of the world, created by people like you and free to use under an open licence.
See example rich preview for a changeset (and card rendering preview for IM and social media types): https://richpreview.com/?url=https%3A%2F%2Fsiteproxy.ruqli.workers.dev%3A443%2Fhttps%2Fwww.openstreetmap.org%2Frelation%2F36970
Some prerequisites/observations:

Proposal:
Description field should describe/represent the page's content.
Change og:description for detail page types on openstreetmap.org:

  • Changeset: <changeset_description_cropped_to_50_characters> by <osm_username> on <changeset_timestamp>
  • Relation: <relation_name> - <member_count> members - Last changed: <last_updated_timestamp> (If relation doesn't have a name use type instead for <relation_name>)
  • Way: <way_name> - <node_count> nodes - Last changed: <last_updated_timestamp> (If way doesn't have a name either omit completely or alternatively show key:value for popular top level keys, like highway=, amenity=, waterway=*)
  • Node: <node_name> - Location: - Last changed: <last_updated_timestamp> (Same comment as for way names should apply here as well)
  • User: <changeset_count> changes, last <last_changeset_timestamp> - <track_count> tracks - <blog_count> blogs

NB: The OpenGraph description should remain as is (layouts.intro_text) for all other pages

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions