[nodebb-plugin-link-preview] Rich Embeds and Link Previews
-
You may have noticed me testing some rich embeds on this forum, or perhaps you've noticed that on this board, pasted links automatically expand/unfurl into a pretty little box instead of staying as a plain anchor.
This is due to the Link Preview plugin, which I started working on last month!
... wait, why did I just paste a boring ol' anchor like that?
https://github.com/NodeBB/nodebb-plugin-link-preview/
SHAZAM!
You can install this plugin by running
npm install nodebb-plugin-link-preview
, or via the plugin manager. It should show up on any NodeBB v3 instance. -
The original impetus for this plugin was due to IFramely starting to become unreliable and/or slow, causing topics to load slowly.
This plugin is the culmination of some discussion by @phenomlab and I, who in parallel, ended up taking different approaches to resolving the problem.
He has detailed his efforts for an IFramely replacement (using OGProxy) on his site, check it out!
-
Release v1.1.0
- A framework for "special embeds" was built out, and a couple defaults added in. A special embed would be one where a third-party provides a preferred embed code for use instead of the default box that ships with this plugin.
- YouTube and Vimeo are the built-in defaults, but additional ones can be added fairly easily.
- There is also a new ACP interface that builds upon commits in v3.2.x, so that is the new minimum version required.
-
Thanks @julian for this plugin.
I have deactivate my iframely plugin and test your plugin.
There must be a blank line above the link. Is that the way you want it? When there isn't an blank line we got no preview. Which is not so bad, see the example
And what i don't need is an preview in this code.
Sources: * Link1 * Link2 and so on
-
-
@julian It's quite confusing that clicking on the image opens the image in a new tab, instead of the link itself...
I don't think this is expected behavior, the expected behavior is that clicking on the image opens the link, and those who want to view the image enlarged will right-click > open image in a new tab -
The YouTube embed overflows on mobile, causing the page to have empty space to the right. Probably needs a max-width.
-
@julian said in [nodebb-plugin-link-preview] Rich Embeds and Link Previews:
@torn2 the plugin is configurable via the ACP. Including the YouTube embed.
Wher in the ACP do we find the settings for this? I do not see it in the plugin as any settings available for this plugin.