Skip to content

Commit

Permalink
adjust docs config page (#4529)
Browse files Browse the repository at this point in the history
  • Loading branch information
mirnawong1 authored Dec 19, 2023
2 parents 7a28340 + be1c0eb commit 1b3f543
Showing 1 changed file with 48 additions and 8 deletions.
56 changes: 48 additions & 8 deletions website/docs/reference/resource-configs/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,24 @@ default_value: {show: true}

<TabItem value="models">

<File name='models/schema.yml'>
You can configure `docs` behavior for many resources at once by setting in `dbt_project.yml`. You can also use the `docs` config in `properties.yaml` files, to set or override documentation behaviors for specific resources:


<File name='dbt_project.yml'>

```yml
models:
[<resource-path>](/reference/resource-configs/resource-path):
+docs:
show: true | false

```

</File>

<File name='models/schema.yml'>

```yml
version: 2

models:
Expand All @@ -32,7 +46,6 @@ models:
show: true | false
node_color: "black"
```
</File>
</TabItem>
Expand All @@ -45,6 +58,20 @@ This property is not implemented for sources.
<TabItem value="seeds">
You can use the docs property in YAML files, including the `dbt_project.yml`:

<File name='dbt_project.yml'>

```yml
seeds:
[<resource-path>](/reference/resource-configs/resource-path):
+docs:
show: true | false
```

</File>

<File name='seeds/schema.yml'>

```yml
Expand All @@ -61,6 +88,20 @@ seeds:

<TabItem value="snapshots">

You can use the docs property in YAML files, including the `dbt_project.yml`:

<File name='dbt_project.yml'>

```yml
snapshots:
[<resource-path>](/reference/resource-configs/resource-path):
+docs:
show: true | false
```

</File>

<File name='snapshots/schema.yml'>

```yml
Expand All @@ -77,6 +118,9 @@ snapshots:

<TabItem value="analyses">

You can use the docs property in YAML files, _except_ in `dbt_project.yml`. Refer to [Analysis properties](/reference/analysis-properties) for more info.


<File name='analysis/schema.yml'>

```yml
Expand All @@ -93,9 +137,7 @@ analyses:

<TabItem value="macros">

<!----
To-do: check this
--->
You can use the docs property in YAML files, _except_ in `dbt_project.yml`. Refer to [Macro properties](/reference/macro-properties) for more info.

<File name='macros/schema.yml'>

Expand All @@ -109,16 +151,14 @@ macros:
```
</File>

Also refer to [macro properties](/reference/macro-properties).
</TabItem>

</Tabs>

## Definition
The docs field can be used to provide documentation-specific configuration to models. It supports the doc attribute `show`, which controls whether or not models are shown in the auto-generated documentation website. It also supports `node_color` for some node types.

**Note:** hidden models will still appear in the dbt DAG visualization but will be identified as "hidden.”
**Note:** Hidden models will still appear in the dbt DAG visualization but will be identified as "hidden.”

## Default
The default value for `show` is `true`.
Expand Down

0 comments on commit 1b3f543

Please sign in to comment.