Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# main [(unreleased)](https://github.com/fastruby/jekyll-external-link-accessibility/compare/v0.2.0...main)

- Your changes/patches go here.

# v0.2.0 / 2026-07-15 [(commits)](https://github.com/fastruby/jekyll-external-link-accessibility/compare/v0.1.0...v0.2.0)

- [FEATURE: Detect external links by host instead of URL prefix, ignoring the `www.` prefix and host casing](https://github.com/fastruby/jekyll-external-link-accessibility/pull/4)
- [FEATURE: Open internal links in a new tab too, without adding `rel="nofollow"`](https://github.com/fastruby/jekyll-external-link-accessibility/pull/4)
- [FEATURE: Show the new-tab icon on all links, not just external ones](https://github.com/fastruby/jekyll-external-link-accessibility/pull/4)

# v0.1.0

- [FEATURE: Add accessibility attributes (`target`, `title`, new-tab icon, screen-reader note) and `rel="nofollow"` to external links in blog posts](https://github.com/fastruby/jekyll-external-link-accessibility/commit/cbc17d840038fa932f4c1f2f153b885a659fa69e)
- [FEATURE: Add a `data-no-external` attribute to skip individual links](https://github.com/fastruby/jekyll-external-link-accessibility/commit/49c4721)
- [FEATURE: Add `post-excerpt` class links to the accessibility code](https://github.com/fastruby/jekyll-external-link-accessibility/pull/1)
- [BUGFIX: Skip `scss` and `json` files in the hook](https://github.com/fastruby/jekyll-external-link-accessibility/pull/2)
- [BUGFIX: Skip `xml` files in the hook](https://github.com/fastruby/jekyll-external-link-accessibility/pull/3)
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This plugin makes every link in your blog posts open in a new tab accessibly (`t

1. Add the gem to your `Gemfile`:
```ruby
gem 'jekyll-external-link-accessibility', github: 'fastruby/jekyll-external-link-accessibility'
gem 'jekyll-external-link-accessibility'
```
2. Run `bundle install` to install the gem
3. Add the following to your `_config.yml`:
Expand Down Expand Up @@ -45,3 +45,26 @@ Next to each link is a new-tab icon with a `icon-external-link` class name. You
| `external_links.rel` | `external nofollow noopener noreferrer` | The `rel` attribute to add to external links. |
| `external_links.target` | `_blank` | The `target` attribute to add to external links. |
| `external_links.title` | `Opens a new window` | The `title` attribute to add title to links. |

## Steps to release a new version

We follow [Semantic Versioning](https://semver.org/): bump MAJOR for incompatible changes, MINOR for backwards-compatible features, and PATCH for backwards-compatible bug fixes.

1. Update the version in `lib/jekyll-external-link-accessibility/version.rb`
2. Update `CHANGELOG.md`: move the `main (unreleased)` entries under a new `vX.Y.Z / YYYY-MM-DD` header
3. Push a `release/vX.Y.Z` branch with those changes
4. Open a pull request titled "Release vX.Y.Z" and merge it to `main`
5. Tag the release and push the tag:
```bash
git checkout main && git pull
git tag vX.Y.Z
git push --tags
```
6. Build the gem:
```bash
gem build jekyll-external-link-accessibility.gemspec
```
7. Push it to RubyGems:
```bash
gem push jekyll-external-link-accessibility-X.Y.Z.gem
```
7 changes: 3 additions & 4 deletions jekyll-external-link-accessibility.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@ Gem::Specification.new do |spec|

spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = "https://github.com/fastruby/jekyll-external-link-accessibility"
spec.metadata["changelog_uri"] = "https://github.com/fastruby/jekyll-external-link-accessibility"
spec.metadata["changelog_uri"] = "https://github.com/fastruby/jekyll-external-link-accessibility/blob/main/CHANGELOG.md"

# Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
spec.files = Dir["{lib}/**/*", "MIT-LICENSE", "README.md"]
spec.files = Dir["{lib}/**/*", "LICENSE.txt", "README.md", "CHANGELOG.md"]
spec.require_paths = ['lib']

spec.add_dependency "jekyll", '~> 4.0', '>= 4.0.1'
spec.add_runtime_dependency 'nokogiri', '~> 1.8', '>= 1.8.5'
spec.add_dependency 'nokogiri', '~> 1.8', '>= 1.8.5'

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add_runtime_dependency is obsolete

end