prefer-docusaurus-heading
确保使用的由 theme-classic
提供的 @theme/Heading
主题组件而不是 <hn>
标题标签。
规则详情
此规则的错误代码示例:
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
此规则的正确代码示例:
import Heading from '@theme/Heading'
<Heading as='h1'>This is heading 1</Heading>
<Heading as='h2'>This is heading 2</Heading>
<Heading as='h3'>This is heading 3</Heading>