Table of Content with frontmatter - How

With 1.12 the new feature “Use markdown frontmatter to provide Table of contents, language and frontmatter rendering” was introduced. But documentation is missing. How do I need to set the frontmatter in a markdown file to provide table of contents?