{"id":13496571,"url":"https://github.com/posthtml/posthtml-external-link","last_synced_at":"2025-10-30T08:42:12.441Z","repository":{"id":53360463,"uuid":"313964068","full_name":"posthtml/posthtml-external-link","owner":"posthtml","description":"Add \"rel='external noopenner nofollow'\" and \"target=_blank\" to all external links","archived":false,"fork":false,"pushed_at":"2021-06-04T19:44:35.000Z","size":138,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-22T21:33:17.143Z","etag":null,"topics":["posthtml","posthtml-plugin","seo"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/posthtml.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-18T14:43:43.000Z","updated_at":"2022-02-19T11:56:30.000Z","dependencies_parsed_at":"2022-09-05T00:52:05.056Z","dependency_job_id":null,"html_url":"https://github.com/posthtml/posthtml-external-link","commit_stats":null,"previous_names":["sukkaw/posthtml-external-link"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/posthtml/posthtml-external-link","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-external-link","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-external-link/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-external-link/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-external-link/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/posthtml","download_url":"https://codeload.github.com/posthtml/posthtml-external-link/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-external-link/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263007728,"owners_count":23398868,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["posthtml","posthtml-plugin","seo"],"created_at":"2024-07-31T19:01:51.908Z","updated_at":"2025-10-30T08:42:07.396Z","avatar_url":"https://github.com/posthtml.png","language":"TypeScript","readme":"# posthtml-external-link\n\n\u003cimg align=\"right\" width=\"220\" height=\"200\" title=\"PostHTML logo\" src=\"http://posthtml.github.io/posthtml/logo.svg\"\u003e\n\n[![Version](https://img.shields.io/npm/v/posthtml-external-link.svg?style=flat-square)](https://www.npmjs.com/package/posthtml-external-link)\n[![License](https://img.shields.io/npm/l/posthtml-external-link.svg?style=flat-square)](./LICENSE)\n[![Build using TypeScript](https://img.shields.io/badge/definitions-TypeScript-blue.svg?style=flat-square)](https://www.typescriptlang.org/)\n\nA [PostHTML](https://posthtml.org) plugin to add `rel=\"external noopener nofollow\"` and `\"target=_blank\"` to all external links automatically, for privacy and SEO. [Read more](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types).\n\n## Installations\n\n```bash\n$ npm i -D posthtml-external-link\n$ yarn add posthtml-external-link -D # If you prefer yarn\n```\n\n## Usage\n\nSince `posthtml-external-link` is a [PostHTML](https://posthtml.org) plugin, just add `posthtml-external-link` to PostHTML plugins array.\n\n```js\nconst posthtml = require('posthtml');\nconst { posthtmlExternalLink } = require('posthtml-external-link');\n\nposthtml([\n  // Other PostHTML plugins\n  postHtmlExternalLink({\n    // Here goes options\n  }),\n  // Other PostHTML plugins\n]).process(source/* input html */)\n  .then(result =\u003e console.log(result.html))\n```\n\n## Options\n\n```js\npostHtmlExternalLink({\n  exclude: ['exclude1.com', 'exclude2.com'],\n  noreferrer: false\n}),\n```\n\n#### exclude (`string | string[]`)\n\nExclude hostname. Specify subdomain when applicable.\n\n\u003e `exclude1.com` does not apply to `www.exclude1.com` nor `en.exclude1.com`.\n\n#### noreferrer (`boolean`)\n\nWhether to add `noreferrer` to external links' `rel` attribute.\n\n## Maintainer\n\n**posthtml-external-link** © [Sukka](https://github.com/SukkaW), Released under the [MIT](./LICENSE) License.\u003cbr\u003e\nAuthored and maintained by Sukka with help from contributors ([list](https://github.com/SukkaW/posthtml-external-link/contributors)).\n\n\u003e [Personal Website](https://skk.moe) · [Blog](https://blog.skk.moe) · GitHub [@SukkaW](https://github.com/SukkaW) · Telegram Channel [@SukkaChannel](https://t.me/SukkaChannel) · Twitter [@isukkaw](https://twitter.com/isukkaw) · Keybase [@sukka](https://keybase.io/sukka)\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposthtml%2Fposthtml-external-link","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fposthtml%2Fposthtml-external-link","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposthtml%2Fposthtml-external-link/lists"}