{"id":19273259,"url":"https://github.com/iwstkhr/rehype-target-blank","last_synced_at":"2025-06-14T22:09:05.618Z","repository":{"id":224221650,"uuid":"761167935","full_name":"iwstkhr/rehype-target-blank","owner":"iwstkhr","description":"Plugin to make target _blank","archived":false,"fork":false,"pushed_at":"2024-11-03T14:48:43.000Z","size":63,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-09T20:44:07.896Z","etag":null,"topics":["blank","rehype","target"],"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/iwstkhr.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-21T11:18:19.000Z","updated_at":"2024-11-03T14:47:19.000Z","dependencies_parsed_at":"2024-11-09T20:42:03.115Z","dependency_job_id":"7b1f8009-9de7-4ad6-bf63-0251632d47c4","html_url":"https://github.com/iwstkhr/rehype-target-blank","commit_stats":null,"previous_names":["iwstkhr/rehype-target-blank"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iwstkhr%2Frehype-target-blank","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iwstkhr%2Frehype-target-blank/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iwstkhr%2Frehype-target-blank/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iwstkhr%2Frehype-target-blank/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iwstkhr","download_url":"https://codeload.github.com/iwstkhr/rehype-target-blank/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232594554,"owners_count":18547407,"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":["blank","rehype","target"],"created_at":"2024-11-09T20:41:56.389Z","updated_at":"2025-01-05T14:20:09.452Z","avatar_url":"https://github.com/iwstkhr.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rehype-target-blank\nrehype plugin to set `_blank` to `target` attributes.\n\n## Installation\n```sh\nnpm i git+https://github.com/iwstkhr/rehype-target-blank.git\n```\n\n## Options\n| Name | Type | Description |\n| ---- | ---- | ----------- |\n| excludes | string[] | Excluded URLs |\n| icon | boolean | Whether an external icon should be displayed |\n| iconClass | string | CSS classes for an external icon |\n| rel | string | [`rel`](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel) attribute value |\n\n## Usage in Astro\nAdd `rehypeTargetBlank` to `astro.config.mjs` like the following.\n\n```js\nexport default defineConfig({\n  site: 'https://\u003cYOUR_SITE\u003e/',\n  integrations: [tailwind()],\n  markdown: {\n    rehypePlugins: [\n      [rehypeTargetBlank, {\n        excludes: [\n          'https://\u003cYOUR_SITE\u003e',\n          'http://localhost',\n          '#',\n        ],\n        icon: true,\n        iconClass: 'ml-1 inline-block align-text-top w-2.5 h-2.5',\n        rel: 'external',\n      }],\n    ],\n  },\n});\n```\n\nIf you use Tailwind CSS, please make sure to add `'./node_modules/@iwstkhr/rehype-target-blank/**/*.js',` to `tailwind.config.js` like the following.\n\n```js\n/** @type {import('tailwindcss').Config} */\nexport default {\n  darkMode: 'class',\n  content: [\n    './src/**/*.{js,jsx,ts,tsx,astro}',\n    './node_modules/@iwstkhr/rehype-target-blank/**/*.js',\n  ],\n  theme: {\n    extend: {},\n  },\n  plugins: [],\n};\n```\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiwstkhr%2Frehype-target-blank","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiwstkhr%2Frehype-target-blank","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiwstkhr%2Frehype-target-blank/lists"}