Options

frontmatterGlobals

💡

Specify static variables to be added to all frontmatter blocks.

Accepts a key/value object.

YAML
---
layout: docs
sidebar: true
---
typedoc.json
{
  "frontmatterGlobals": {
    "layout": "docs",
    "sidebar": true
  }
}

readmeFrontmatter

💡

Specify static variables to be added to the readme page only.

Accepts a key/value object.

typedoc.json
{
  "readmeFrontmatter": {
    "onReadme": "true"
  }
}

indexFrontmatter

💡

Specify static variables to be added to the index page only.

Accepts a key/value object.

typedoc.json
{
  "indexFrontmatter": {
    "onIndex": "true"
  }
}

frontmatterCommentTags

💡

Specify which comment block tags should be added to frontmatter.

Accepts an array of string values.

Frontmatter variables can be added by extracting comments from block (@) tags.

Please note tags must be added to the comment blocks of the symbol exported to a page.

Block Tags (someModule.ts)
/**
 * @author Joe Bloggs
 *
 * @description A description that will be added to frontmatter.
 */
YAML (someModule.md)
---
author: Joe Bloggs
description: A description that will be added to frontmatter.
---
typedoc.json
{
  "frontmatterCommentTags": ["author", "description"]
}

preserveFrontmatterCommentTags

💡

Preserve tags defined in frontmatter block tags in output.

Accepts a boolean value. Defaults to false.

By default tags defined in frontmatterCommentTags are removed from final output.

Use this option to preserve the tags in the output.

typedoc.json
{
  "preserveFrontmatterCommentTags": false
}

frontmatterNamingConvention

💡

The naming convention that variables should be output as.

Accepts either "camelCase" or "snakeCase". Defaults to "camelCase".

Block tags have to be written in camelCase (see tsdoc.org).

This option can configure the output style of frontmatter variables when written to YAML.

typedoc.json
{
  "frontmatterNamingConvention": "camelCase"
}

yamlStringifyOptions

💡
Options to pass into yaml.stringify().

Accepts a key/value object.

Provides additional options to control how YAML is internally serialized using the yaml.stringify method from the YAML library.

For available options, see YAML ToString Options.

Please note that { lineWidth: 0 } is set by default to prevent invalid wrapping.

typedoc.json
{
  "yamlStringifyOptions": {
    "defaultStringType": "QUOTE_SINGLE",
    "defaultKeyType": "PLAIN"
  }
}