1.1.0 • Published 5 years ago

@mashvp/swup-html-lang-plugin v1.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

Swup HTML lang Plugin

This is a plugin for swup - complete, flexible, extensible and easy to use page transition library for your web.

This plugin will update the lang attribute of the HTML node after navigation, which is useful for multilingual sites.

Instalation

This plugin can be installed with npm

npm install @mashvp/swup-html-lang-plugin

and included with import

import SwupHtmlLangPlugin from '@mashvp/swup-html-lang-plugin';

or included from the dist folder

<script src="./dist/MashvpSwupHtmlLangPlugin.js"></script>

Usage

To run this plugin, include an instance in the swup options.

const swup = new Swup({
  plugins: [new SwupHtmlLangPlugin()]
});