[openstreetmap/openstreetmap-website] Enhance opengraph rich preview for changeset, relation, way, node, user pages (#2007)
Minh Nguyễn
notifications at github.com
Wed Jun 28 01:30:28 UTC 2023
Currently the same code sets the Open Graph meta tags for every page, regardless of the view:
https://github.com/openstreetmap/openstreetmap-website/blob/466de96a91ece362400ec7ffe73ed243f9ce3067/app/helpers/open_graph_helper.rb#L3-L11
The [Open Graph Protocol specification](https://ogp.me/) describes an `article` namespace that would be useful for diary posts as long as `og:type` is set to `article`. Diary posts should also have `og:locale` set to the post’s language. I suppose changesets could be articles as well, with `article:published_time` and `article:modified_time` corresponding to the changeset’s opened and closed timestamps.
> Especially for changeset, this may cause some strange side effect: you will still see all details as long as you're authenticated, and a forbidden message otherwise. Sharing such a "forbidden" link on Twitter isn't exactly what people expect.
I think this would only be relevant to changesets in the proposal above. The user and diary post views should be unaffected, because the user name is part of the URL anyways.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/2007#issuecomment-1610461991
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/issues/2007/1610461991 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20230627/176e09d0/attachment.htm>
More information about the rails-dev
mailing list