iframely icon indicating copy to clipboard operation
iframely copied to clipboard

Any hints or beginner guide about how to get more information?

Open JohnRock0422 opened this issue 3 years ago • 1 comments

Refer to this issue. Missing meta description, site, author and date https://github.com/itteco/iframely/issues/362

Where can I find beginner's guide for develop a plugin about extract description from wikipedia?

JohnRock0422 avatar Mar 28 '22 15:03 JohnRock0422

There's a very old general overview of how to write a plugin. It's obsolete in some places, for example there's now cheerio input variable instead of $selector. But it does provide a general idea. It is best to take a look at /plugins folder to see the other plugins as an example.

Basically, for your purpose, you'd need to create a domain plugin in /domains folder and with re node that contains a regex to URLs you'd want to support. Add method getMeta as node of your plugin. The method should return an object with properties description, site, author and date. As in return {description: ..., site: ..., author: ..., date: ...}.

Keep your custom plugins in the folder that you specify as CUSTOM_PLUGINS_PATH in your local config files. See here. And also keep /domains subfolder in that plugins directory.

iparamonau avatar Mar 28 '22 17:03 iparamonau