You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 20, 2024. It is now read-only.
I'd like to notify the user when a redirect has happened. A good way for me would be to e.g. specify a query parameter to the new URL.
So as an example:
---redirect_from:
- url: /old-page/queryParams:
- message: "This page has been updated"---
So if the user requests example.com/old-page it should direct to example.com/new-page?message=This page has been updated
In addition it would be awesome to specify this query parameter setting globally in the plugin config:
Option a) Straight-forward:
{"plugins": [{resolve: 'gatsby-redirect-from',options: {defaultQueryParams: {message: "This page has been updated"}}},]}
Option b) More dynamic:
{"plugins": [{resolve: 'gatsby-redirect-from',options: {onRedirect: (from,to)=>`${to}?message=${encodeURIComponent('Update your bookmark from '+from)}`}},]}
The text was updated successfully, but these errors were encountered:
I'd like to notify the user when a redirect has happened. A good way for me would be to e.g. specify a query parameter to the new URL.
So as an example:
So if the user requests
example.com/old-page
it should direct toexample.com/new-page?message=This page has been updated
In addition it would be awesome to specify this query parameter setting globally in the plugin config:
Option a) Straight-forward:
Option b) More dynamic:
The text was updated successfully, but these errors were encountered: