Skip to content

Commit

Permalink
bump to v2.0.0 (#9)
Browse files Browse the repository at this point in the history
* Return the dominant color of the page when no theme-color meta markup is found. (get the dominant color of the page #5)
* Handle relative media URL's (add media url normalizers #6)
* Fix runkit cloud environment error (add pptr-extra-user-pref #4)
* TypeScript typings are added (configure typings to the module #8)
* Add 'How See-Link Works?' wiki
  • Loading branch information
bharat-1809 committed Dec 11, 2021
1 parent 96f79bc commit 1ad238b
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 2.0.0

* Return the dominant color of the page when no theme-color meta markup found.
* Handle relative media url's
* Fix runkit cloud environment error
* TypeScript typings are added
* Add 'How See-Link Works?' wiki

## 1.0.2

* Fix a bug where the module was not working on cloud environments.
Expand Down
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,35 @@
# See-Link

[![Build Status](https://img.shields.io/github/workflow/status/bharat-1809/see-link/CI?logo=github)](https://github.com/bharat-1809/see-link)
[![Package Version](https://img.shields.io/badge/npm-v1.0.2-blue)](https://www.npmjs.com/package/see-link)
[![Package Version](https://img.shields.io/badge/npm-v2.0.0-blue)](https://www.npmjs.com/package/see-link)
[![License](https://img.shields.io/badge/License-MIT-orange)](https://github.com/bharat-1809/see-link/blob/2a79daaa549d986eb05d51c8a919452f84a3b14e/LICENSE)
[![Donate](https://img.shields.io/badge/Donate-PayPal-00457C?logo=paypal)](https://www.paypal.me/bsharma1809)

**See-a-Link**! Get the preview metadata like title, description, image, video, etc from a link or a link extracted from the given text.

See-Link looks through the [open-graph](http://ogp.me/), [twitter cards](https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/markup) markup and other meta tags to get the preview information from the link. It visits a link in a headless browser and scrapes the required information. It can also return the dominant color of the page in case the `theme-color` is needed but no meta info is found.

*To know more about **how See-Link works** checkout this [wiki](https://github.com/bharat-1809/see-link/wiki/How-does-see-link-works%3F).*

Check out [this article](https://dev.to/veerreshr/seo-tags-meta-tags-that-you-need-for-previews-on-social-networks-343n) to know about meta tags, SEO and their need for generating link previews.

# Table of Contents

- [Features](#features)
- [Getting Started](#getting-started)
- [Usage](#usage)
- [API](#api)
- [Options](#options)
- [Test](#test)
- [License](#license)

## Features

- Get the dominant color of the page if required.
- Can return images present in html body incase meta tags are not available.
- Can be customized to return the info as per the requirement.
- Uses stealth measures and user-agent can be customized to bypass restrictions setup by sites to prevent bot scraping.

**NOTE**

- A different domain cannot be requested from your web app (browsers block cross-origin-requests). If you do not know how same-origin-policy works, here is a [great article](https://dev.to/lydiahallie/cs-visualized-cors-5b8h), therefore this library works on node (back-end environments) and certain mobile run-times (like react-native).
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "see-link",
"version": "1.0.2",
"version": "2.0.0",
"description": "See-a-link! Get the preview metadata of the given link",
"main": "index.js",
"typings": "lib/see_link.d.ts",
Expand Down

0 comments on commit 1ad238b

Please sign in to comment.