Skip to content

Commit

Permalink
Update docs.md with more clear node_color info (#4120)
Browse files Browse the repository at this point in the history
## What are you changing in this pull request and why?
This mostly updates the documentation of `doc` to better integrate
`node_color` into the page.

## Checklist
- [x] Review the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md)
and [About
versioning](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version)
so my content adheres to these guidelines.
  • Loading branch information
mirnawong1 authored Sep 28, 2023
2 parents bc4f0a7 + 1dc3111 commit 441b642
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions website/docs/reference/resource-configs/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ models:
- name: model_name
docs:
show: true | false
node_color: "black"

```

Expand Down Expand Up @@ -113,13 +114,13 @@ 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. The only currently supported docs attribute is shown, which controls whether or not models are shown in the auto-generated documentation website.
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.”

Expand Down Expand Up @@ -167,7 +168,7 @@ models:
## Custom node colors
The `docs` attribute now supports `node_color` to customize the node color in the DAG within dbt docs. You can define node colors in the files below and apply overrides where needed.
The `docs` attribute now supports `node_color` to customize the display color of some node types in the DAG within dbt docs. You can define node colors in the files below and apply overrides where needed.

`node_color` hiearchy:

Expand All @@ -176,7 +177,7 @@ The `docs` attribute now supports `node_color` to customize the node color in th

## Examples

Add custom node colors to models within subdirectories based on hex codes or a plain color name.
Add custom `node_colors` to models that support it within subdirectories based on hex codes or a plain color name.

![Example](../../../../website/static/img/node_color_example.png)

Expand Down

0 comments on commit 441b642

Please sign in to comment.