Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename Routing Doc and remove duplicate stub #19918

Merged
merged 2 commits into from
Dec 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
9 changes: 0 additions & 9 deletions docs/docs/rendering-sidebar-navigation-dynamically.md

This file was deleted.

6 changes: 6 additions & 0 deletions www/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`,
Expand Down
4 changes: 2 additions & 2 deletions www/src/data/sidebars/doc-links.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down