Nextra 3.0 is released. Read more

API

useThemeConfig hook

The useThemeConfig hook returns values of your theme configuration and is made to dynamically configure your project.

import { useThemeConfig } from 'nextra-theme-docs'

useConfig hook

import { useConfig } from 'nextra-theme-docs'

The useConfig hook returns data from your current page context.

Return Values

  • title: title about current page
  • frontMatter: parsed front matter data
  • filePath: the current Markdown/MDX file path
  • hideSidebar: is sidebar hidden
  • normalizePagesResult: ReturnType<typeof normalizePages>