1

DBT docs - I need to configure the following things on the dbt default documentation generated by using dbt docs generate command.

  1. How to change the default title and the dbt logo that appears in the browser tab.
  2. Also, there is a dbt logo that appears on all the pages in the header section too. Can we change that too.
user961
  • 453
  • 6
  • 20
  • 1
    Refer to my answer [here](https://stackoverflow.com/questions/69266785/dbt-docs-generate-how-to-give-the-specific-branding-to-the-documentation-websi/69318855#69318855) and upvote if it helps answer your question. – Kay Sep 24 '21 at 17:30

1 Answers1

1

I use a script to generate the dbt docs. In that script I modify the generated index.html file to include a custom stylesheet. That stylesheet (mystyle.css in the example below) took a lot of inspiration from the GitLab dbt docs stylesheet.

The script:

export DBT_PROFILES_DIR=<path to the profiles.yml used for docs generation>
dbt deps
dbt docs generate
cp mystyle.css target/
sed -i '.bak' 's|<head>|<head>\n\t<link rel="stylesheet" href="/mystyle.css" />|' target/index.html

Try the above steps locally, you can check the results with

dbt docs serve

I also learned the other day that you can adapt the landing page of the docs site to your liking by adding a custom docs block.

captnswing
  • 615
  • 7
  • 10