lucid-fox / social-magick

An Open Graph Image generator plugin for Joomla 3 and 4
GNU General Public License v3.0
15 stars 1 forks source link

Link preview: editing view #26

Open crystalenka opened 3 years ago

crystalenka commented 3 years ago

Wherever the plugin shows up (menu item, category, article edit views), it would be best to somehow route that piece of content, figure out which template is applying, and display the link preview in the social magick tab. (Side note - since "link preview" is the standard name for what we are doing, should we rename the tab to "social link preview"?)

If the user decides to override the template on that page, it should also dynamically update and show the preview of whatever selected template/options they select.

Ideally, I would love to also show in-context link previews there — this is how the link will show up on facebook, etc, similar to what metatags.io is doing.

SemaphoreOxalis commented 8 months ago

For the preview part as you said metatags.io can be used but it don't offer an API. Passing the url to this website and using file_get_contents and then parsing ghe html for selecting the .index-preview__slide class could be a part of the solution.