Use frontmatter title to set MDX title page

Use frontmatter title to set MDX title page

References

Solution

Add <title> HTML tag directly in your mdx file. The variable frontmatter.title is exposed from remark-mdx-frontmatter plugin.

// ./example.mdx
<title>{frontmatter.title}</title>