Skip to content

Commit

Permalink
Merge pull request #56 from swup/version/automated
Browse files Browse the repository at this point in the history
Update package version (automated)
  • Loading branch information
daun authored Oct 19, 2024
2 parents f61c824 + ad873f7 commit bc2e7cd
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [2.3.0] - 2024-10-19

- Update html element's `dir` attribute
- Allow updating additional html element attributes

## [2.2.1] - 2024-09-09

- Ignore empty string passed into `persistTags` option (@NukeJS)
Expand Down Expand Up @@ -46,6 +51,7 @@

- Initial release

[2.3.0]: https://github.com/swup/head-plugin/releases/tag/2.3.0
[2.2.1]: https://github.com/swup/head-plugin/releases/tag/2.2.1
[2.2.0]: https://github.com/swup/head-plugin/releases/tag/2.2.0
[2.1.2]: https://github.com/swup/head-plugin/releases/tag/2.1.2
Expand Down
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
A [swup](https://swup.js.org) plugin for updating the contents of the head tag.

- Adds any meta tags and assets from the next page to the current document
- Updates the lang attribute of the html element
- Updates the lang and dir attributes of the html element
- Supports delaying the transition until new stylesheets have loaded

## Installation
Expand Down Expand Up @@ -91,3 +91,15 @@ new SwupHeadPlugin({
awaitAssets: true
});
```

### attributes

Update additional attributes of the html element. By default, the `lang` and `dir` attributes are
updated, but you can define a custom list of attributes here. Accepts an array of strings or
regular expression instances.

```javascript
{
attributes: ['lang', 'dir', 'style', /^data-/]
}
```
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@swup/head-plugin",
"amdName": "SwupHeadPlugin",
"version": "2.2.1",
"version": "2.3.0",
"description": "A swup plugin for updating the contents of the head tag",
"type": "module",
"source": "src/index.ts",
Expand Down

0 comments on commit bc2e7cd

Please sign in to comment.