Skip to content

Commit bc2e7cd

Browse files
authored
Merge pull request #56 from swup/version/automated
Update package version (automated)
2 parents f61c824 + ad873f7 commit bc2e7cd

4 files changed

Lines changed: 22 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## [2.3.0] - 2024-10-19
4+
5+
- Update html element's `dir` attribute
6+
- Allow updating additional html element attributes
7+
38
## [2.2.1] - 2024-09-09
49

510
- Ignore empty string passed into `persistTags` option (@NukeJS)
@@ -46,6 +51,7 @@
4651

4752
- Initial release
4853

54+
[2.3.0]: https://github.com/swup/head-plugin/releases/tag/2.3.0
4955
[2.2.1]: https://github.com/swup/head-plugin/releases/tag/2.2.1
5056
[2.2.0]: https://github.com/swup/head-plugin/releases/tag/2.2.0
5157
[2.1.2]: https://github.com/swup/head-plugin/releases/tag/2.1.2

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
A [swup](https://swup.js.org) plugin for updating the contents of the head tag.
44

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

99
## Installation
@@ -91,3 +91,15 @@ new SwupHeadPlugin({
9191
awaitAssets: true
9292
});
9393
```
94+
95+
### attributes
96+
97+
Update additional attributes of the html element. By default, the `lang` and `dir` attributes are
98+
updated, but you can define a custom list of attributes here. Accepts an array of strings or
99+
regular expression instances.
100+
101+
```javascript
102+
{
103+
attributes: ['lang', 'dir', 'style', /^data-/]
104+
}
105+
```

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@swup/head-plugin",
33
"amdName": "SwupHeadPlugin",
4-
"version": "2.2.1",
4+
"version": "2.3.0",
55
"description": "A swup plugin for updating the contents of the head tag",
66
"type": "module",
77
"source": "src/index.ts",

0 commit comments

Comments
 (0)