/canonical

Component: returns the canonical URL for the page.

Primary LanguageJavaScriptMIT LicenseMIT

canonical

Note
Segment has paused maintenance on this project, but may return it to an active status in the future. Issues and pull requests from external contributors are not being considered, although internal contributions may appear from time to time. The project remains available under its open source license for anyone to use.

CircleCI Codecov

Returns the canonical URL for the page.

Installation

$ npm install @segment/canonical

Example

<html>
<head>
  <link rel="canonical" href="http://example.com" />
</head>
</html>
var canonical = require('canonical');
canonical(); // http://example.com