Socket
Socket
Sign inDemoInstall

gatsby-plugin-meta-redirect

Package Overview
Dependencies
4
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gatsby-plugin-meta-redirect

[![Travis][build-badge]][build] [![npm package][npm-badge]][npm]


Version published
Weekly downloads
12K
increased by4.73%
Maintainers
2
Install size
179 kB
Created
Weekly downloads
 

Readme

Source

Travis npm package

gatsby-plugin-meta-redirect

Generates meta redirect html files for redirecting on any static file host.

Install

npm install --save gatsby-plugin-meta-redirect

or

yarn add gatsby-plugin-meta-redirect

How to use

// In your gatsby-config.js
plugins: [
  `gatsby-plugin-meta-redirect` // make sure to put last in the array
];

Redirects

You can create redirects using the createRedirect action.

An example:

createRedirect({ fromPath: '/old-url', toPath: '/new-url', isPermanent: true });
createRedirect({ fromPath: '/url', toPath: '/zn-CH/url', Language: 'zn' });

That will generate the following html files:

/old-url/index.html:

<meta http-equiv="refresh" content="0; URL='/new-url/'" />

and

/url/index.html:

<meta http-equiv="refresh" content="0; URL='/zn-CH/url/'" />

Keywords

FAQs

Last updated on 05 Nov 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc