{"id":13612461,"url":"https://github.com/keithmifsud/jekyll-target-blank","last_synced_at":"2025-10-24T01:26:42.190Z","repository":{"id":41142716,"uuid":"134807260","full_name":"keithmifsud/jekyll-target-blank","owner":"keithmifsud","description":"Automatically opens external links in a new browser for Jekyll Pages, Posts and Docs.","archived":false,"fork":false,"pushed_at":"2023-04-25T05:12:59.000Z","size":934,"stargazers_count":114,"open_issues_count":15,"forks_count":20,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-22T16:15:47.910Z","etag":null,"topics":["jekyll","jekyll-plugin","ruby","rubygem"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/keithmifsud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-05-25T05:24:38.000Z","updated_at":"2025-09-25T17:18:27.000Z","dependencies_parsed_at":"2022-07-13T19:30:32.564Z","dependency_job_id":"28e3cabb-24e1-4d57-b01d-0e7ac6b2e81d","html_url":"https://github.com/keithmifsud/jekyll-target-blank","commit_stats":{"total_commits":285,"total_committers":5,"mean_commits":57.0,"dds":"0.028070175438596467","last_synced_commit":"f6fb51a819a465127dabc9fadfc08f8dacfe8ab4"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/keithmifsud/jekyll-target-blank","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keithmifsud%2Fjekyll-target-blank","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keithmifsud%2Fjekyll-target-blank/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keithmifsud%2Fjekyll-target-blank/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keithmifsud%2Fjekyll-target-blank/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keithmifsud","download_url":"https://codeload.github.com/keithmifsud/jekyll-target-blank/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keithmifsud%2Fjekyll-target-blank/sbom","scorecard":{"id":554090,"data":{"date":"2025-08-11","repo":{"name":"github.com/keithmifsud/jekyll-target-blank","commit":"b8c7fb51f8d101203f6c0aac453196a81f3f51d7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":3,"reason":"Found 3/8 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 27 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T11:51:29.959Z","repository_id":41142716,"created_at":"2025-08-20T11:51:29.959Z","updated_at":"2025-08-20T11:51:29.959Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280675599,"owners_count":26371564,"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","status":"online","status_checked_at":"2025-10-23T02:00:06.710Z","response_time":142,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["jekyll","jekyll-plugin","ruby","rubygem"],"created_at":"2024-08-01T20:00:30.254Z","updated_at":"2025-10-24T01:26:42.161Z","avatar_url":"https://github.com/keithmifsud.png","language":"Ruby","funding_links":[],"categories":["Other","Ruby","Credits"],"sub_categories":["9. Modifying Element Usage"],"readme":"# Jekyll Target Blank\r\n\r\n![Jekyll Target Blank Logo](assets/logo.png \"Jekyll Target Blank\")\r\n\r\nAutomatically adds a `target=\"_blank\" rel=\"noopener noreferrer\"` attribute to all __external__ links in Jekyll's content plus several other automation features for the external links. [Read more here](https://keith-mifsud.me/projects/jekyll-target-blank)\r\n\r\n[![Gem Version](https://badge.fury.io/rb/jekyll-target-blank.svg)](https://badge.fury.io/rb/jekyll-target-blank)\r\n[![Build Status](https://travis-ci.org/keithmifsud/jekyll-target-blank.svg?branch=master)](https://travis-ci.org/keithmifsud/jekyll-target-blank)\r\n\r\n## Installation\r\n\r\nAdd the following to your site's `Gemfile`\r\n\r\n```\r\ngem 'jekyll-target-blank'\r\n```\r\n\r\nand add the following to your site's `_config.yml`\r\n\r\n```yml\r\nplugins:\r\n  - jekyll-target-blank\r\n```\r\n\r\nNote: if `jekyll --version` is less than `3.5` use:\r\n\r\n```yml\r\ngems:\r\n  - jekyll-target-blank\r\n```\r\n\r\n## Usage\r\n\r\nBy default. all anchor tags and markdown links pointing to an external host, other than the one listed as the `url` in Jekyll's `_config.yml` will automatically be opened in a new browser tab once the site is generated.\r\n\r\nAll the links in pages, posts and custom collections are included except for __plain text links.\r\n\r\n### Examples\r\n\r\n#### HTML\r\n\r\nThe following `HTML` anchor tag:\r\n\r\n```html\r\n\u003ca href=\"https://google.com\"\u003eGoogle\u003c/a\u003e\r\n```\r\n\r\nwill be replaced with:\r\n\r\n```html\r\n\u003ca href=\"https://google.com\" target=\"_blank\" rel=\"noopener noreferrer\"\u003eGoogle\u003c/a\u003e\r\n```\r\n\r\n..unless your website's URL is google.com 😉\r\n\r\n#### Markdown\r\n\r\n```markdown\r\n[Google](https://google.com)\r\n```\r\n\r\nwill be generated as:\r\n\r\n```html\r\n\u003ca href=\"https://google.com\" target=\"_blank\" rel=\"noopener noreferrer\"\u003eGoogle\u003c/a\u003e\r\n```\r\n\r\n### Configuration\r\n\r\nNo custom configuration is needed for using this plugin, however, you can override some default behaviours and also make use of some extra features as explained in this section. \r\n\r\n#### Override the default behaviour\r\n\r\nYou can override the default behaviour and only force external links to open in new browser if they have a CSS class name included with the same value as the one listed in the Jekyll `_config.yml` file.\r\n\r\nTo override this automation, add an entry in your site's `config.yml` file, specifying which CSS class name a link must have for it to be forced to open in a new browser:\r\n\r\n```yaml\r\ntarget-blank:\r\n    css_class: ext-link\r\n```\r\n\r\nWith the above setting, only links containing the `class=\"ext-link\"` attribute will be forced to open in a new browser.\r\n\r\n#### Automatically add additional CSS Classes\r\n\r\nYou can also automatically add additional CSS classes to qualifying external links. This feature is useful when you want to add CSS styling to external links such as automatically displaying an icon to show the reader that the link will open in a new browser.\r\n\r\nYou can add one or more __space__ separated CSS classes in `_config.yml` like so:\r\n\r\n ```yaml\r\n target-blank:\r\n     add_css_classes: css-class-one css-class-two\r\n ```\r\n \r\n The above example will add `class=\"css-class-one css-class-two\"` to the generated anchor tag. These CSS class names will be added in addition to any other existing CSS class names of a link.\r\n \r\n #### Override the default rel attributes\r\n \r\n For security reasons, `rel=\"noopener noreferrer\"` are added by default to all the processed external links. You can override adding any of the `noopener` and `noreferrer` values with the following entries in your site's `_config.yml` file. \r\n  \r\n __To exclude the `noopener` value:__\r\n \r\n ```yaml\r\ntarget-blank:\r\n    noopener: false\r\n```\r\n\r\n__To exclude the `noreferrer` value:__\r\n \r\n ```yaml\r\ntarget-blank:\r\n    noreferrer: false\r\n```\r\n\r\n__To exclude both `noopener` and `noreferrer` values:__\r\n \r\n ```yaml\r\ntarget-blank:\r\n    noopener: false\r\n    noreferrer: false\r\n```\r\n\r\n#### Adding additional rel attribute values\r\n\r\nYou can add additional `rel=\"\"` attribute values by simply specifying them in your site's `_config.yml` file.\r\n\r\n```yaml\r\ntarget-blank:\r\n    rel: nofollow\r\n```\r\n\r\nor even more than one extra:\r\n\r\n```yaml\r\ntarget-blank:\r\n    rel: nofollow\r\n```\r\n\r\n__Note:__\r\n\r\n\r\nThe `rel` setting overrides other default `rel` attribute values. Therefore, (for example), if you exclude the `noopener` value and then add it to the `rel` property, it will still be added. The following `config`:\r\n\r\n```yaml\r\ntarget-blank:\r\n    noopener: false\r\n    rel: noopener\r\n```\r\n\r\nwill output:\r\n\r\n```html\r\n\u003ca href\"https://some-external-website.what\" target=\"_blank\" rel=\"noreferrer noopener\"\u003eSome link\u003c/a\u003e\r\n```\r\n\r\n\r\n## Support\r\n\r\nSimply [create an issue](https://github.com/keithmifsud/jekyll-target-blank/issues/new) and I will respond as soon as possible.\r\n\r\n\r\n## Contributing\r\n\r\n1. [Fork it](https://github.com/keithmifsud/jekyll-target-blank/fork)\r\n2. Create your feature branch (`git checkout -b my-new-feature)\r\n3. Commit your changes (`git commit -m 'Add some feature'`)\r\n4. Push to the branch (git push origin my-new-feature)\r\n4. Create a new Pull Request\r\n\r\n\r\n### Testing\r\n\r\n```bash\r\nrake spec\r\n# or\r\nrspec\r\n```\r\n\r\n## Credits\r\n\r\nThe logo illustration was \u003ca href=\"http://www.freepik.com\"\u003eDesigned by Freepik\u003c/a\u003e. Thank you ❤️\r\n\r\n\r\n## Legal\r\n\r\nThis software is distributed under the [MIT](LICENSE.md) license.\r\n\r\n\u0026copy; 2018 - Keith Mifsud \u003chttps://keith-mifsud.me\u003e and approved contributors.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeithmifsud%2Fjekyll-target-blank","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeithmifsud%2Fjekyll-target-blank","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeithmifsud%2Fjekyll-target-blank/lists"}