0.0.14-preview.9 • Published 5 months ago

@mediporta/gatsby-plugin-nginx-redirect v0.0.14-preview.9

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

Description

This plugin creates a nginx conf file with the gatsby created redirects

Dependencies

Gatsby version 4

In order to work you have to use the output .conf file in your nginx server

How to install

npm install --save @mediporta/gatsby-plugin-nginx-redirect

Available options

inputConfigFile (required)

The path for input nginx configuration file

outputConfigFile (required)

The path of the outputted nginx configuration file with the redirects within.

whereToIncludeRedirects (optional)(defaults to: "server")

Dot notation to define where to include the redirects. So "server" will search for the server header, "http.server" will search for http containing server.

Examples of usage

In gatsby-config.js

plugins: [
  ...,
  {
    resolve: "@mediporta/gatsby-plugin-nginx-redirect",
    options: {
      inputConfigFile: `${__dirname}/nginx.conf`,
      outputConfigFile: `${__dirname}/nginx.out.conf`,
      whereToIncludeRedirects: "http.server" // defaults to: "server"
    },
  },
  ...
]

Now you can use gatsby`s createRedirect action to generate your custom http redirects

How to contribute

Feel free to open an issue with your doubt, bug or suggestion.

0.0.14-preview.9

5 months ago

0.0.14-preview.8

5 months ago

0.0.14-preview.7

5 months ago

0.0.14-preview.6

5 months ago

0.0.14-preview.5

5 months ago

0.0.14-preview.4

5 months ago

0.0.14-preview.3

5 months ago

0.0.14-preview.2

5 months ago

0.0.14-preview.1

5 months ago

0.0.14

5 months ago

0.0.1

5 months ago

1.0.0

5 months ago