Skip to content

Commit

Permalink
docs(config): add docs config page/option to root config (#1485)
Browse files Browse the repository at this point in the history
  • Loading branch information
tanner-reits authored Sep 25, 2024
1 parent bff3e6d commit 4d995e8
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/config/01-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ stencil-project-root

Please see the [Dev-Server docs](./dev-server.md).

## docs

Please see the [docs config](./docs.md).

## enableCache

*default: `true`*
Expand Down
44 changes: 44 additions & 0 deletions docs/config/docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
title: Documentation Generation Config
sidebar_label: Docs Config
description: Documentation Generation Config
slug: /docs-config
---

# Docs Config

The `docs` config option allows global configuration of certain behaviors related to [documentation generation output targets](../documentation-generation/01-overview.md).

:::note
These configurations are **global** and will be applied to all output target instances including those defined in the [`outputTargets`](../output-targets/01-overview.md)
configuration, as well as those injected by CLI flags (like `--docs`).
:::

## markdown

The `markdown` config object allows certain customizations for markdown files generated by the [`docs-readme` output target](../documentation-generation/docs-readme.md) or the
`--docs` CLI flag.

### targetComponent

**Optional**

**Default: `{ textColor: '#333', background: '#f9f' }`**

This option allows you to change the colors used when generating the dependency graph mermaid diagrams for components. Any hex color string is a valid
value.

```tsx title="stencil.config.ts"
import { Config } from '@stencil/core';

export const config: Config = {
docs: {
markdown: {
targetComponent: {
textColor: '#fff',
background: '#000',
},
},
},
};
```

0 comments on commit 4d995e8

Please sign in to comment.