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

Change "docs/home" to "docs" #1257

Merged
merged 9 commits into from
May 7, 2020
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
8 changes: 4 additions & 4 deletions content/blog/2020-04-30-gsod-ideas-2020.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion content/docs/sidebar.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[
{
"slug": "home",
"slug": "",
"label": "Home",
"source": "index.md"
},
{
Expand Down
1 change: 0 additions & 1 deletion redirects-list.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 1 addition & 5 deletions src/gatsby/models/docs/onCreateMarkdownContentNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/utils/shared/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand Down