diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..3721763 --- /dev/null +++ b/CHANGELOG.md @@ -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) diff --git a/README.md b/README.md index ed3bf53..48eed3c 100644 --- a/README.md +++ b/README.md @@ -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`: @@ -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 + ``` diff --git a/jekyll-external-link-accessibility.gemspec b/jekyll-external-link-accessibility.gemspec index a6011b4..5f9e09b 100644 --- a/jekyll-external-link-accessibility.gemspec +++ b/jekyll-external-link-accessibility.gemspec @@ -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' end