Skip to content

Commit bb37a59

Browse files
Describe interaction of getHeadings with MDX imports (#14072)
Co-authored-by: Armand Philippot <59021693+ArmandPhilippot@users.noreply.github.com>
1 parent 49f0f81 commit bb37a59

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • src/content/docs/en/guides/integrations-guide

‎src/content/docs/en/guides/integrations-guide/mdx.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ The following properties are available to a `.astro` component when using an `im
147147
- **`file`** - The absolute file path (e.g. `/home/user/projects/.../file.mdx`).
148148
- **`url`** - The URL of the page (e.g. `/en/guides/markdown-content`).
149149
- **`frontmatter`** - Contains any data specified in the file’s YAML/TOML frontmatter.
150-
- **`getHeadings()`** - An async function that returns an array of all headings (`<h1>` to `<h6>`) in the file with the type: `{ depth: number; slug: string; text: string }[]`. Each heading’s `slug` corresponds to the generated ID for a given heading and can be used for anchor links.
150+
- **`getHeadings()`** - An async function that returns an array of all headings (`<h1>` to `<h6>`) in the file with the type: `{ depth: number; slug: string; text: string }[]`. Each heading’s `slug` corresponds to the generated ID for a given heading and can be used for anchor links. Headings from imported files are not included.
151151
- **`<Content />`** - A component that returns the full, rendered contents of the file.
152152
- **(any `export` value)** - MDX files can also export data with an `export` statement.
153153

0 commit comments

Comments
 (0)