Skip to Content
🎉 Nextra 4.0 已发布。Dima Machina 正在 寻找新的工作或咨询机会

API

useThemeConfig hook

useThemeConfig hook 返回你的主题配置的值,用于动态配置你的项目。

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

useConfig hook

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

useConfig hook 返回当前页面上下文的数据。

返回值

  • hideSidebar: 侧边栏是否隐藏
  • normalizePagesResult: ReturnType<typeof normalizePages>
  • normalizePagesResult.activeMetadata: 已解析的front matter或从页面导出的元数据
Last updated on