docs: enhance docs about Markdown TOC and metadata (#7278)

* docs: multiple documentation improvements

* fix

* fix
This commit is contained in:
Joshua Chen 2022-04-30 21:30:14 +08:00 committed by GitHub
parent afc72480ab
commit 9fd5d62340
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 129 additions and 84 deletions

View file

@ -426,7 +426,7 @@ The table of contents does not currently contain the imported Markdown headings.
Within the MDX page, the following variables are available as globals:
- `frontMatter`: the front matter as a record of string keys and values;
- `toc`: the table of contents, as a tree of headings. See also [Inline TOC](./markdown-features-inline-toc.mdx) for a more concrete use-case.
- `toc`: the table of contents, as a tree of headings. See also [Inline TOC](./markdown-features-toc.mdx#inline-table-of-contents) for a more concrete use-case.
- `contentTitle`: the Markdown title, which is the first `h1` heading in the Markdown text. It's `undefined` if there isn't one (e.g. title specified in the front matter).
```jsx