Skip to content

Commit

Permalink
Merge pull request #35 from swup/next
Browse files Browse the repository at this point in the history
Update for swup 4
  • Loading branch information
daun authored Jul 26, 2023
2 parents a542b80 + 19cb080 commit 5f5e52d
Show file tree
Hide file tree
Showing 13 changed files with 7,769 additions and 13,641 deletions.
8 changes: 1 addition & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,4 @@ wiki-wishlist
*.sublime-workspace
.editorconfig
.idea
lib
/plugins
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
/dist
16 changes: 0 additions & 16 deletions .npmignore

This file was deleted.

38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Changelog

<!-- ## [Unreleased] -->

## [2.0.0] - 2023-07-26

- Switch to microbundle
- Export native ESM module
- Update for swup 4 compatibility

## [1.3.0] - 2023-01-19

- Allow delaying transition until new assets have loaded

## [1.2.1] - 2022-08-07

- Append each tag after previous version of itself

## [1.2.0] - 2021-03-13

- Update html language attribute

## [1.1.0] - 2020-11-30

- Allow persisting assets

## [1.0.0] - 2019-05-25

- Initial release

[Unreleased]: https://github.com/swup/head-plugin/compare/2.0.0...HEAD

[2.0.0]: https://github.com/swup/head-plugin/releases/tag/2.0.0
[1.3.0]: https://github.com/swup/head-plugin/releases/tag/1.3.0
[1.2.1]: https://github.com/swup/head-plugin/releases/tag/1.2.1
[1.2.0]: https://github.com/swup/head-plugin/releases/tag/1.2.0
[1.1.0]: https://github.com/swup/head-plugin/releases/tag/1.1.0
[1.0.0]: https://github.com/swup/head-plugin/releases/tag/1.0.0
18 changes: 9 additions & 9 deletions readme.md → README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
# Swup Head Plugin

This plugin will replace the contents of the `<head>` on each page visit.
Useful for adding different stylesheets or meta tags that would otherwise go
ignored.
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
- Supports delaying the transition until new stylesheets have loaded

## Installation

This plugin can be installed with npm
Install the plugin from npm and import it into your bundle.

```bash
npm install @swup/head-plugin
```

and included with import

```javascript
```js
import SwupHeadPlugin from '@swup/head-plugin';
```

or included from the dist folder
Or include the minified production file from a CDN:

```html
<script src="./dist/SwupHeadPlugin.js"></script>
<script src="https://unpkg.com/@swup/head-plugin@2"></script>
```

## Usage
Expand Down
Loading

0 comments on commit 5f5e52d

Please sign in to comment.