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.