From 7e2fae191609e6af7ee692b68c0d3162542a6170 Mon Sep 17 00:00:00 2001 From: Laurie Barth Date: Mon, 2 Dec 2019 09:55:11 -0500 Subject: [PATCH 1/2] Rename Routing Doc and remove duplicate stub --- ...ites-navigation.md => creating-dynamic-navigation.md} | 4 +--- docs/docs/rendering-sidebar-navigation-dynamically.md | 9 --------- www/src/data/sidebars/doc-links.yaml | 4 ++-- 3 files changed, 3 insertions(+), 14 deletions(-) rename docs/docs/{centralizing-your-sites-navigation.md => creating-dynamic-navigation.md} (99%) delete mode 100644 docs/docs/rendering-sidebar-navigation-dynamically.md diff --git a/docs/docs/centralizing-your-sites-navigation.md b/docs/docs/creating-dynamic-navigation.md similarity index 99% rename from docs/docs/centralizing-your-sites-navigation.md rename to docs/docs/creating-dynamic-navigation.md index 32fda697bdd57..3eff994deaed8 100644 --- a/docs/docs/centralizing-your-sites-navigation.md +++ b/docs/docs/creating-dynamic-navigation.md @@ -1,9 +1,7 @@ --- -title: Centralizing Your Site's Navigation +title: Creating Dynamic Navigation in Gatsby --- -## Creating dynamic navigation in Gatsby - At times you will want to be able to edit your website's navigation in response to a _change in requirements_. To achieve this, you can use Gatsby to dynamically generate your navigation. Where you store the data for your navigation can be anywhere - a backend API, CMS, headless CMS or even the filesystem. What this section will cover: diff --git a/docs/docs/rendering-sidebar-navigation-dynamically.md b/docs/docs/rendering-sidebar-navigation-dynamically.md deleted file mode 100644 index 84e85aa9977cf..0000000000000 --- a/docs/docs/rendering-sidebar-navigation-dynamically.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: Rendering Sidebar Navigation Dynamically -issue: https://github.com/gatsbyjs/gatsby/issues/9779 ---- - -This is a stub. Help our community expand it. - -Please use the [Gatsby Style Guide](/contributing/gatsby-style-guide/) to ensure your -pull request gets accepted. diff --git a/www/src/data/sidebars/doc-links.yaml b/www/src/data/sidebars/doc-links.yaml index 9ea4e7ceac4de..137f656db2bbf 100644 --- a/www/src/data/sidebars/doc-links.yaml +++ b/www/src/data/sidebars/doc-links.yaml @@ -418,8 +418,8 @@ link: /docs/linking-and-prefetching-with-gatsby/ - title: Location Data from Props link: /docs/location-data-from-props/ - - title: Centralizing Your Site's Navigation - link: /docs/centralizing-your-sites-navigation/ + - title: Creating Dynamic Navigation + link: /docs/creating-dynamic-navigation/ - title: Rendering Sidebar Navigation Dynamically* link: /docs/rendering-sidebar-navigation-dynamically/ - title: Client-only Routes & User Authentication From 830fcc4659572797cb0f9124597ecaf47876f294 Mon Sep 17 00:00:00 2001 From: Laurie Barth Date: Tue, 3 Dec 2019 15:36:05 -0500 Subject: [PATCH 2/2] add redirect --- www/gatsby-node.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/www/gatsby-node.js b/www/gatsby-node.js index 1188e3632a383..0ffd13e363aae 100644 --- a/www/gatsby-node.js +++ b/www/gatsby-node.js @@ -413,6 +413,12 @@ exports.createPages = ({ graphql, actions, reporter }) => { isPermanent: true, }) + createRedirect({ + fromPath: `/docs/centralizing-your-sites-navigation/`, + toPath: `/docs/creating-dynamic-navigation/`, + isPermanent: true, + }) + Object.entries(startersRedirects).forEach(([fromSlug, toSlug]) => { createRedirect({ fromPath: `/starters${fromSlug}`,