docs: 102: use source link instead

Signed-off-by: Sam Alba <sam.alba@gmail.com>
This commit is contained in:
Sam Alba 2021-06-23 10:53:03 +02:00
parent b03e695970
commit 29ace62b72

View File

@ -165,7 +165,7 @@ app: yarn.#Package & {
Let's break it down:
- `package multibucket`: this file is part of the multibucket package
- `import ( "dagger.io/js/yarn" )`: import a package from the [Dagger Universe](/reference/universe/README).
- `import ( "dagger.io/js/yarn" )`: import a package from the [Dagger Universe](../reference/universe/README.md).
- `app: yarn.#Package`: apply the `#Package` definition at the key `app`
- `&`: also merge the following values at the same key...
- `{ source: src }`: set the key `app.source` to the value of `src`. This connects our 2 components, forming the first link in our DAG.
@ -194,7 +194,7 @@ site: "netlify": netlify.#Site & {
This is very similar to the previous component:
- We use the same package name as the other files
- We import another package from the [Dagger Universe](/reference/universe/README).
- We import another package from the [Dagger Universe](../reference/universe/README.md).
- `site: "netlify": site.#Netlify`: apply the `#Site` definition at the key `site.netlify`. Note the use of quotes to protect the key from name conflict.
- `&`: also merge the following values at the same key...
- `{ contents: app.build }`: set the key `site.netlify.contents` to the value of `app.build`. This connects our components 2 and 3, forming the second link in our DAG.
@ -202,14 +202,14 @@ This is very similar to the previous component:
### Exploring a package documentation
But wait: how did we know what fields were available in `yarn.#Package` and `netlify.#Site`?
Answer: thanks to the `dagger doc` command, which prints the documentation of any package from [Dagger Universe](/reference/universe/README).
Answer: thanks to the `dagger doc` command, which prints the documentation of any package from [Dagger Universe](../reference/universe/README.md).
```shell
dagger doc dagger.io/netlify
dagger doc dagger.io/js/yarn
```
You can also browse the [Dagger Universe](/reference/universe/README) reference in the documentation.
You can also browse the [Dagger Universe](../reference/universe/README.md) reference in the documentation.
## Setup the environment