diff --git a/.eslintrc.js b/.eslintrc.js index 56851d0247c3..1acb68f82e64 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -375,6 +375,7 @@ module.exports = { '@typescript-eslint/no-unused-vars': [ERROR, {ignoreRestSiblings: true}], '@typescript-eslint/prefer-optional-chain': ERROR, '@docusaurus/no-html-links': ERROR, + '@docusaurus/prefer-docusaurus-heading': ERROR, '@docusaurus/no-untranslated-text': [ WARNING, { @@ -495,5 +496,14 @@ module.exports = { files: ['packages/eslint-plugin/**/*.{js,ts}'], extends: ['plugin:eslint-plugin/recommended'], }, + { + files: [ + 'packages/docusaurus-plugin-debug/**', + 'packages/docusaurus/src/**', + ], + rules: { + '@docusaurus/prefer-docusaurus-heading': OFF, + }, + }, ], }; diff --git a/packages/create-docusaurus/templates/classic-typescript/src/components/HomepageFeatures/index.tsx b/packages/create-docusaurus/templates/classic-typescript/src/components/HomepageFeatures/index.tsx index 91ef4601d2fc..75cd587bb065 100644 --- a/packages/create-docusaurus/templates/classic-typescript/src/components/HomepageFeatures/index.tsx +++ b/packages/create-docusaurus/templates/classic-typescript/src/components/HomepageFeatures/index.tsx @@ -1,5 +1,6 @@ import React from 'react'; import clsx from 'clsx'; +import Heading from '@theme/Heading'; import styles from './styles.module.css'; type FeatureItem = { @@ -48,7 +49,7 @@ function Feature({title, Svg, description}: FeatureItem) {
-

{title}

+ {title}

{description}

diff --git a/packages/create-docusaurus/templates/classic-typescript/src/pages/index.tsx b/packages/create-docusaurus/templates/classic-typescript/src/pages/index.tsx index 305139fba009..056c3d953b76 100644 --- a/packages/create-docusaurus/templates/classic-typescript/src/pages/index.tsx +++ b/packages/create-docusaurus/templates/classic-typescript/src/pages/index.tsx @@ -4,6 +4,7 @@ import Link from '@docusaurus/Link'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import Layout from '@theme/Layout'; import HomepageFeatures from '@site/src/components/HomepageFeatures'; +import Heading from '@theme/Heading'; import styles from './index.module.css'; @@ -12,7 +13,9 @@ function HomepageHeader() { return (
-

{siteConfig.title}

+ + {siteConfig.title} +

{siteConfig.tagline}

-

{title}

+ {title}

{description}

diff --git a/packages/create-docusaurus/templates/classic/src/pages/index.js b/packages/create-docusaurus/templates/classic/src/pages/index.js index affcd9099c28..282c3fad6020 100644 --- a/packages/create-docusaurus/templates/classic/src/pages/index.js +++ b/packages/create-docusaurus/templates/classic/src/pages/index.js @@ -5,6 +5,7 @@ import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import Layout from '@theme/Layout'; import HomepageFeatures from '@site/src/components/HomepageFeatures'; +import Heading from '@theme/Heading'; import styles from './index.module.css'; function HomepageHeader() { @@ -12,7 +13,9 @@ function HomepageHeader() { return (
-

{siteConfig.title}

+ + {siteConfig.title} +

{siteConfig.tagline}

-

{year}

+ + {year} +