Linkpreview - link cards for Yellow

· 1 min ·

Last year I asked myself whether I should include a link preview or not. At that time, I was thinking of a solution to place the preview in tooltips. However, as this would add unnecessary clutter to the site and users of mobile devices would have little or nothing to gain from it, I implemented a different approach.

As I want to have control over which link receives a preview and which does not, I have opted for a shortcut solution.

So that a query is not sent to the linked server every time a page is called up, I have integrated a simple caching function that writes the preview information to a JSON file and retrieves it from there.

A preview is only generated if it is a block element. If it is inadvertently created as an inline element, a simple link is output.

I still have to make a few adjustments in terms of performance, but basically the extension is already running smoothly.

GitHub - pftnhr/yellow-linkpreview: Shows a link preview for selected links
GitHubGitHub - pftnhr/yellow-linkpreview: Shows a link preview for selected linksShows a link preview for selected links. Contribute to pftnhr/yellow-linkpreview development by creating an account on GitHub.

Reply via e-mail

Back to top