Accudio / swup-meta-tags-plugin

Update meta tags in head on swup page change

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Swup Meta Tags Plugin

This is a plugin for swup - complete, flexible, extensible and easy to use page transition library for your web. On a page change, this plugin remove existing meta tags and some link tags and adds those from the new page.

Instalation

This plugin can be installed with npm

npm install swup-meta-tags-plugin

and included with import

import SwupMetaTagsPlugin from 'swup-meta-tags-plugin';

or included from the dist folder

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

Usage

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

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

About

Update meta tags in head on swup page change

License:MIT License


Languages

Language:JavaScript 100.0%