diff --git a/docs/contributing/docs-contributions.md b/docs/contributing/docs-contributions.md index b6af6c8c2c6c3..d3e48c8260417 100644 --- a/docs/contributing/docs-contributions.md +++ b/docs/contributing/docs-contributions.md @@ -109,14 +109,11 @@ Sometimes it makes sense to move or rename a file as part of docs restructuring - Run proposed structure changes by the Gatsby docs team in [a GitHub issue](/contributing/how-to-file-an-issue/) to ensure your change is accepted. - Update all instances of the old URL to your new one. [Find and replace](https://code.visualstudio.com/docs/editor/codebasics#_search-across-files) in VS Code can help. Check that the context of the original link reference still makes sense with the new one. -- For SEO purposes, add a redirect to the `createPages` function in [`www/gatsby-node.js`](https://github.com/gatsbyjs/gatsby/tree/master/www/gatsby-node.js). Here's an example: - -```js:title=www/gatsby-node.js -createRedirect({ - fromPath: `/docs/source-plugin-tutorial/`, - toPath: `/docs/pixabay-source-plugin-tutorial/`, - isPermanent: true, -}) +- For SEO purposes, add a redirect to [`www/redirects.yaml`](https://github.com/gatsbyjs/gatsby/tree/master/www/redirects.yaml). Here's an example: + +```yaml:title=www/redirects.yaml +- fromPath: /docs/source-plugin-tutorial/ + toPath: /docs/pixabay-source-plugin-tutorial/ ``` ## Claim your swag