[openstreetmap/openstreetmap-website] Set og:image:alt OpenGraph property (PR #5046)

Anton Khorev notifications at github.com
Mon Aug 5 02:45:27 UTC 2024


`og:image:alt` is set to
- "OpenStreetMap logo" when the default osm logo image is used as `og:image`, like attempted in #3945
- alt text from the first image of a diary entry when it's use as `og:image`
- nothing with the property skipped if the first image has no `alt` attribute, which is unlikely because you can't do it with markdown syntax

You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/5046

-- Commit Summary --

  * Add image_alt accessor to rich text
  * Set og:image:alt OpenGraph property

-- File Changes --

    M app/controllers/diary_entries_controller.rb (1)
    M app/helpers/open_graph_helper.rb (21)
    M app/views/layouts/_meta.html.erb (2)
    M lib/rich_text.rb (12)
    M test/controllers/diary_entries_controller_test.rb (30)
    M test/lib/rich_text_test.rb (26)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/5046.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5046.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5046
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5046 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240804/f9d24d9a/attachment.htm>


More information about the rails-dev mailing list