Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Plugins

How to turn URLs into rich media embeds?

Started by Thomas R. 6 years ago · 3 replies · 677 views
6 years ago

Dear Grav community,

I decided to launch my private portfolio website by using Grav. Since this is a private project and I’m learning HTML, CSS, PHP etc. as an autodidact, a lot of the first steps with Grav are based on trial and error.

My plan is to have a one pager website with one specific section, where I present third party links to my works. Do you have any advice, how I can show these URLs as rich media embeds? To be more precise: I’d like to grab the meta information of the websites and show title, description, header image etc. as rich media embeds (like Facebook or Instagram posts for example). There are services like microlink.io already existing for such cases. However, there are limitations when it comes to the styling.

Maybe there is a plug-in around which I didn’t find yet or you guys have some further tips for me on how to realize this idea.

Best regards!

last edited 04/26/20 by Thomas R.
6 years ago

Hi @thrstk, and welcome to Grav Family ;)
When you visit official plugins catalogue and search for "embed", you'll find some examples of what you need.

Hope this helps! :)
https://getgrav.org/downloads/plugins

6 years ago

Hey MakaryGo,

thanks for your fast reply! I already skimmed through the plugins section yesterday but didn't find a fitting extension right away. I only find the possibility to present rich media embeds for YouTube. In my case, I'm looking for a tool which presents not only Instagram, Facebook, Youtube etc. but any given URL as rich media content. I wrote some articles recently and would like to embed visually appealing links to these websites within my landing page.

Kind regards!

6 years ago
  1. Not sure it's active, but seems most versatile, may be a good point to start learning:
    https://github.com/Gertt/grav-plugin-embed
  2. Another rather versatile plugin, again not sure if still supported, but I used it a few years ago, and was really happy with it:
    https://github.com/sommerregen/grav-plugin-mediaembed
    Also, I believe that author is here on the forum, perhaps he'd be able to give you some guidance :) @Sommerregen
  3. Probably one of my fav plugins of all time, using really cool text processing library, TextFormatter. Among other cool things, also creates auto embeds, and also was created by Sommerregen!
    https://github.com/sommerregen/grav-plugin-textformatter
  4. I never actually gave it a try, but the idea is really interesting - this one does not rewrite links to use provider's iframe code, but fetches the content itself. Again, I didn't try it, but it seems logical that this kind of approach can be really versatile and possibly easier to hack:
    https://github.com/Nebulius/grav-plugin-static-social-embeds
    Another approach worth looking into IMO would be looking into the Shortcode plugins:
    https://github.com/getgrav/grav-plugin-shortcode-core
    It is easily extendable, and really well documented ;)
    Also, if you want really universal solution, I'd suggest creating a plugin that makes use of the oEmbed format, as it is almost standard, among many others used by all Wordpress-based websites.

So, good luck and fingers crossed ;)

Suggested topics

Topic Participants Replies Views Activity
Plugins · by Rene, 1 week ago
2 43 1 week ago
Plugins · by Xavier, 4 weeks ago
2 54 4 weeks ago
Plugins · by Luka Prinčič, 7 years ago
3 1181 1 month ago
Plugins · by Sebastian van de Meer, 1 month ago
1 48 1 month ago
Plugins · by PIERROT Alain, 2 months ago
3 73 2 months ago