[openstreetmap/openstreetmap-website] Improve the preview of diary entries on social media sites (using OpenGraph HTML tags) (PR #3942)
Andy Allan
notifications at github.com
Sat Feb 25 15:33:54 UTC 2023
Beyond that, I would like to find a better approach where the views pass these overrides into the opengraph tags, rather than using instance variables in the controllers. I believe the view is the right place for declaring these tags, since choosing "how something is shown" is the concern of the view, rather than the controller (which is more about fetching the data). So I would expect all the choices about titles, length of text etc to be written in app/views/diary_entries/show.html.erb and somehow make their way to the right place in the layout. For example, we use `content_for` for passing html to the `<head>` already, but it's not quite the same here since we want to pass overrides to the opengraph defaults.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3942#issuecomment-1445143301
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/3942/c1445143301 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20230225/1b8a6686/attachment-0001.htm>
More information about the rails-dev
mailing list