Last updated

markdown

The markdown settings are used to customize the behavior and appearance of pages that render from Markdown files.

Options

OptionTypeDescription
frontMatterKeysToResolve[string]An array where each entry is a front matter key to resolve at build time. By default, values for image and links are resolved.
partialsFolders[string]An array of directory paths to folders used for storing partials. The _partials folder works by default, but all other folders must be listed in partialsFolder in order to work with partials.
lastUpdatedBlockLast updated objectConfigures the "Last updated..." string that renders at the top of pages.
tocTable of contents objectControls the page table of contents.
editPageEdit page objectToggle the appearance of an edit page button. When clicked, users are directed to the public GitHub repo for the current page.

Last updated object

OptionTypeDescription
formatstringSpecifies the format of the last updated time displayed. Possible values: iso, short, long, or timeago. Default value: timeago.
localestringLocale of the date. Works with ISO 639-1 country codes. Default value: en-US.
hidebooleanControl the visibility of the last updated time. Default value: false.

Table of contents object

OptionTypeDescription
headerstringConfigure the heading of the table of contents. Default value: On this page.
depthintegerSet the maximum depth of the heading displayed in the table of contents. Default value: 3 Minimum value: 1.
hidebooleanControl the visibility of the table of contents. Default value: false.

Edit page object

OptionTypeDescription
baseUrlstringSet the base URL that the page's path is appended to. The link should direct users somewhere to submit an edit, for example a public GitHub repo.
hidebooleanControl the visibility of the edit page button. Default value: true.

Examples

Define project-level defaults using the redocly.yaml configuration file in your root directory, as in the following example:

redocly.yaml
markdown:
  frontMatterKeysToResolve: ['screen-recordings', 'image', 'links']
  partialsFolders: ['_guide-partials']
  lastUpdatedBlock:
    format: long
    locale: en-US
  toc:
    header: Page sections
    depth: 3
  editPage:
    baseUrl: 'https://github.com/Redocly/redocly-cli/tree/main/docs'
    hide: false

When needed, add page-level overrides in the front matter of markdown pages, as in the following example:

---
markdown:
  lastUpdatedBlock:
    hide: true
  toc:
    header: Tutorial steps
    depth: 5
  editPage:
    hide: true
---

# Some amazing guide

Amazing markdown content...