메인 컨텐츠로 이동
버전: 3.2.1

no-html-links

Ensure that the Docusaurus <Link> component is used instead of <a> tags.

The <Link> component has prefetching and preloading built-in. 또한 빌드 시 끊어진 링크를 감지하고 도큐사우루스가 사이트 구조를 더 잘 이해할 수 있게 도와줍니다.

Rule Details

Examples of incorrect code for this rule:

<a href="/page">go to page!</a>

<a href="https://twitter.com/docusaurus" target="_blank">Twitter</a>

Examples of correct code for this rule:

import Link from '@docusaurus/Link'

<Link to="/page">go to page!</Link>

<Link to="https://twitter.com/docusaurus">Twitter</Link>

Rule Configuration

설정할 수 있는 필드

옵션타입기본값설명
ignoreFullyResolvedbooleanfalseSet to true will not report any <a> tags with absolute URLs including a protocol.