Skip to content

Commit

Permalink
Fixing broken links for get started docs of master branch of docs (#4326
Browse files Browse the repository at this point in the history
)

* Fixing broken links for non-latest branch of docs

* fixed internal reference links
  • Loading branch information
prashant-shahi committed Dec 1, 2019
1 parent a7dec1e commit db2d91c
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 78 deletions.
2 changes: 1 addition & 1 deletion wiki/content/get-started-old/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title = "Get Started (Old)"
+++

{{% notice "note" %}}This is an older version of the Getting Started page. You can see the latest page [here](/get-started). {{% /notice %}}
{{% notice "note" %}}This is an older version of the Getting Started page. You can see the latest page [here](../get-started). {{% /notice %}}

## Dgraph

Expand Down
6 changes: 3 additions & 3 deletions wiki/content/get-started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title = "Get Started with Dgraph"
+++

{{% notice "note" %}}You can see an older version of the Getting Started page [here](/get-started-old).{{% /notice %}}
{{% notice "note" %}}You can see an older version of the Getting Started page [here](../get-started-old).{{% /notice %}}

## Tutorials

Expand Down Expand Up @@ -68,8 +68,8 @@ title = "Get Started with Dgraph"
- Go to [Clients]({{< relref "clients/index.md" >}}) to see how to communicate
with Dgraph from your application.
- Take the [Tour](https://tour.dgraph.io) for a guided tour of how to write queries in Dgraph.
- A wider range of queries can also be found in the [Query Language](/query-language) reference.
- See [Deploy](/deploy) if you wish to run Dgraph
- A wider range of queries can also be found in the [Query Language]({{< relref "query-language/index.md" >}}) reference.
- See [Deploy]({{< relref "deploy/index.md" >}}) if you wish to run Dgraph
in a cluster.

## Need Help
Expand Down
20 changes: 10 additions & 10 deletions wiki/content/tutorial-1/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ title = "Get Started with Dgraph - Introduction"

In this tutorial, we'll learn how to build the following graph on Dgraph,

![The simple graph](/images/tutorials/1/gs-1.JPG)
![The simple graph](../images/tutorials/1/gs-1.JPG)

In the process, we'll learn about:

Expand Down Expand Up @@ -40,7 +40,7 @@ docker run --rm -it -p 8000:8000 -p 8080:8080 -p 9080:9080 dgraph/standalone:lat
### Nodes and Edges
In this section, we'll build a simple graph with two nodes and an edge connecting them.

![The simple graph](/images/tutorials/1/gs-1.JPG)
![The simple graph](../images/tutorials/1/gs-1.JPG)

In a Graph Database, concepts or entities are represented as nodes.
May it be a sale, a transaction, a place, or a person, all these entities are
Expand All @@ -59,11 +59,11 @@ The `dgraph/standalone` image setup comes with the useful Dgraph UI called Ratel
Just visit [http://localhost:8000](http://localhost:8000) from your browser, and you will be able to access it.


![ratel-1](/images/tutorials/1/gs-2.png)
![ratel-1](../images/tutorials/1/gs-2.png)

We'll be using the latest stable release of Ratel.

![ratel-2](/images/tutorials/1/gs-3.png)
![ratel-2](../images/tutorials/1/gs-3.png)

### Mutations using Ratel

Expand Down Expand Up @@ -110,11 +110,11 @@ A small modification to the mutation will fix it, so it creates an edge in betwe
}
```

![explain mutation](/images/tutorials/1/explain-query.JPG)
![explain mutation](../images/tutorials/1/explain-query.JPG)

Let's execute this mutation. Click Run and boom!

![Query-gif](/images/tutorials/1/mutate-example.gif)
![Query-gif](../images/tutorials/1/mutate-example.gif)

You can see in the response that two UIDs (Universal IDentifiers) have been created.
The two values in the `"uids"` field of the response correspond
Expand All @@ -138,7 +138,7 @@ The expression `has(name)` returns all the nodes with a predicate `name` associa
Go to the `Query` tab this time and type in the query above.
Then, click `Run` on the top right of the screen.

![query-1](/images/tutorials/1/query-1.png)
![query-1](../images/tutorials/1/query-1.png)

Ratel renders a graph visualization of the result.

Expand All @@ -147,11 +147,11 @@ matching the ones, we saw in the mutation's response.

You can also view the JSON results in the JSON tab on the right.

![query-2](/images/tutorials/1/query-2.png)
![query-2](../images/tutorials/1/query-2.png)

#### Understanding the query

![Illustration with explanation](/images/tutorials/1/explain-query-2.JPG)
![Illustration with explanation](../images/tutorials/1/explain-query-2.JPG)

The first part of the query is the user-defined function name.
In our query, we have named it as `people`. However, you could use any other name.
Expand Down Expand Up @@ -227,7 +227,7 @@ They also can be used to create an edge between existing nodes!

Sounds interesting?

Check out our next tutorial of the getting started series [here](/tutorial-2/).
Check out our next tutorial of the getting started series [here](../tutorial-2/).

## Need Help

Expand Down
30 changes: 15 additions & 15 deletions wiki/content/tutorial-2/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ title = "Get Started with Dgraph - Basic Operations"

**Welcome to the second tutorial of getting started with Dgraph.**

In the [previous tutorial](/tutorial-1/) of getting started,
In the [previous tutorial](../tutorial-1/) of getting started,
we learned some of the basics of Dgraph.
Including how to run the database, add new nodes and predicates, and query them back.

![Graph](/images/tutorials/2/graph-1.jpg)
![Graph](../images/tutorials/2/graph-1.jpg)

In this tutorial, we'll build the above Graph and learn more about operations using the UID (Universal Identifier) of the nodes.
Specifically, we'll learn about:
Expand Down Expand Up @@ -48,7 +48,7 @@ Go to Ratel's mutate tab, paste the mutation below in the text area, and click R
}
```

![mutation-1](/images/tutorials/2/a-add-data.gif)
![mutation-1](../images/tutorials/2/a-add-data.gif)

## Query using UIDs
The UID of the nodes can be used to query them back.
Expand All @@ -74,7 +74,7 @@ Go to the query tab, type in the query below, and click Run.

Now, from the result, copy the UID of Michael's node.

![get-uid](/images/tutorials/2/b-get-uid-1.png)
![get-uid](../images/tutorials/2/b-get-uid-1.png)

In the query below, replace the placeholder `MICHAELS_UID` with the UID you just copied, and run the query.

Expand All @@ -88,12 +88,12 @@ In the query below, replace the placeholder `MICHAELS_UID` with the UID you just
}
```

![get_node_from_uid](/images/tutorials/2/c-query-uid.png)
![get_node_from_uid](../images/tutorials/2/c-query-uid.png)
*Note: `MICHAELS_UID` appears as `0x8` in the images. The UID you get on your machine might have a different value.*

You can see that the `uid` function returns the node matching the UID for Michael's node.

Refer to the [previous tutorial](/tutorial-1/) if you have questions related to the structure of the query in general.
Refer to the [previous tutorial](../tutorial-1/) if you have questions related to the structure of the query in general.

## Updating predicates
You can also update one or more predicates of a node using its UID.
Expand Down Expand Up @@ -128,7 +128,7 @@ You can see that Michael's age is updated to 41.
}
```

![update check](/images/tutorials/2/d-update-check.png)
![update check](../images/tutorials/2/d-update-check.png)

Similarly, you can also add new predicates to an existing node.
Since the predicate `country` doesn't exist for the node for `Michael`, it creates a new one.
Expand All @@ -151,7 +151,7 @@ Let's say, `Leyla` starts to follow `Michael`.

We know that this relationship between them has to represented by creating the `follows` edge between them.

![Graph](/images/tutorials/2/graph-2.jpg)
![Graph](../images/tutorials/2/graph-2.jpg)

First, let's copy the UIDs of nodes for `Leyla` and `Michael` from Ratel.

Expand Down Expand Up @@ -195,7 +195,7 @@ Let's run a traversal query and then understand it in detail.

Here's the result.

![traversal-result](/images/tutorials/2/e-traversal.png)
![traversal-result](../images/tutorials/2/e-traversal.png)


The query has three parts:
Expand All @@ -222,7 +222,7 @@ Since Michael follows only one person, the traversal returns just one node.
These are `level-2` nodes. The root nodes constitute the nodes for `level-1`.
Again, we need to specify which predicates you want to get back from `level-2` nodes.

![get_node_from_uid](/images/tutorials/2/j-explain.JPG)
![get_node_from_uid](../images/tutorials/2/j-explain.JPG)

You can extend the query to make use of `level-2` nodes and traverse the Graph further and deeper.
Let's explore that in the next section.
Expand Down Expand Up @@ -253,7 +253,7 @@ That's when we say that the query is deep!
}
```

![level-3-query](/images/tutorials/2/f-level-3-traverse.png)
![level-3-query](../images/tutorials/2/f-level-3-traverse.png)

Here is one more example from the extention of the last query.

Expand All @@ -278,7 +278,7 @@ Here is one more example from the extention of the last query.
}
```

![level 3](/images/tutorials/2/g-level-4-traversal.png)
![level 3](../images/tutorials/2/g-level-4-traversal.png)

This query is really long! The query is four levels deep.
In other words, the depth of the query is four.
Expand Down Expand Up @@ -312,7 +312,7 @@ The depth parameter specifies the maximum depth the traversal query should consi

Let's run the recursive traversal query after replacing the placeholder with the UID of node for Michael.

![recurse](/images/tutorials/2/h-recursive-traversal.png)
![recurse](../images/tutorials/2/h-recursive-traversal.png)


[Check out the docs](https://docs.dgraph.io/query-language/#recurse-query) for detailed instructions on using the `recurse` directive.
Expand Down Expand Up @@ -349,7 +349,7 @@ Let's delete the `age` predicate of the node for `Michael`.
}
```

![recurse](/images/tutorials/2/i-delete.png)
![recurse](../images/tutorials/2/i-delete.png)

## Wrapping up
In this tutorial, we learned about the CRUD operations using UIDs.
Expand All @@ -361,7 +361,7 @@ Did you know that you could search predicates based on their value?

Sounds interesting?

Check out our next tutorial of the getting started series [here](/tutorial-3/).
Check out our next tutorial of the getting started series [here](../tutorial-3/).

## Need Help

Expand Down
Loading

0 comments on commit db2d91c

Please sign in to comment.