Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update package version (automated) #56

Merged
merged 3 commits into from
Oct 19, 2024
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
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
Loading