diff --git a/content/blog/2020-04-30-gsod-ideas-2020.md b/content/blog/2020-04-30-gsod-ideas-2020.md index cb6c000003..96f5dc7d79 100644 --- a/content/blog/2020-04-30-gsod-ideas-2020.md +++ b/content/blog/2020-04-30-gsod-ideas-2020.md @@ -121,10 +121,10 @@ few skills we look for in applicants. friendly wording as much as possible and pay close attention to consistency in our terminology. Our team will help with copy editing. -1. **Command line experience.** [DVC](/doc/home) is a command line tool that - builds on top of [Git](https://git-scm.com/), so being able to play with it - and test the features will be very useful. Creating and managing files, - GNU/Linux commands, file and permission administration are desired skills. +1. **Command line experience.** [DVC](/doc) is a command line tool that builds + on top of [Git](https://git-scm.com/), so being able to play with it and test + the features will be very useful. Creating and managing files, GNU/Linux + commands, file and permission administration are desired skills. 1. **People skills.** We put a high value on communication: the ability to discuss ideas, explain your goals, report progress, and work kindly with more diff --git a/content/docs/sidebar.json b/content/docs/sidebar.json index e527b38dec..010c72a513 100644 --- a/content/docs/sidebar.json +++ b/content/docs/sidebar.json @@ -1,6 +1,7 @@ [ { - "slug": "home", + "slug": "", + "label": "Home", "source": "index.md" }, { diff --git a/redirects-list.json b/redirects-list.json index 3c17e8139a..0c030a7149 100644 --- a/redirects-list.json +++ b/redirects-list.json @@ -19,7 +19,6 @@ "^/((?:deb|rpm)/.+) https://s3-us-east-2.amazonaws.com/dvc-s3-repo/$1 303", "^/(?:help|chat)/?$ https://discordapp.com/invite/dvwXA2N 303", "^/(?:docs|documentation)(/.*)?$ /doc$1", - "^/doc/?$ /doc/home 307", "^/doc/get-started(/.*)?$ /doc/tutorials/get-started$1", "^/doc/tutorial/?$ /doc/tutorials", "^/doc/tutorial/(.*)? /doc/tutorials/deep/$1", diff --git a/src/gatsby/models/docs/onCreateMarkdownContentNode.js b/src/gatsby/models/docs/onCreateMarkdownContentNode.js index e665d64fc4..da13a8da55 100644 --- a/src/gatsby/models/docs/onCreateMarkdownContentNode.js +++ b/src/gatsby/models/docs/onCreateMarkdownContentNode.js @@ -9,11 +9,7 @@ function createMarkdownDocsNode(api, { parentNode }) { const { name, relativePath } = parentNode splitDir[0] = 'doc' - // Make a special exemption for the root doc. - const slug = - parentNode.relativePath === 'docs/index.md' - ? '/doc/home' - : path.posix.join('/', ...splitDir, name === 'index' ? '/' : name) + const slug = path.posix.join('/', ...splitDir, name === 'index' ? '' : name) const fieldData = { slug, diff --git a/src/utils/shared/sidebar.js b/src/utils/shared/sidebar.js index de77d7ac84..f77a1691d9 100644 --- a/src/utils/shared/sidebar.js +++ b/src/utils/shared/sidebar.js @@ -28,7 +28,7 @@ const FILE_EXTENSION = '.md' function validateRawItem({ slug, source, children }) { const isSourceDisabled = source === false - if (!slug) { + if (typeof slug !== 'string') { throw Error("'slug' field is required in objects in sidebar.json") }