mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-24 06:27:02 +02:00
chore: release Docusaurus 3.7.0 (#10812)
This commit is contained in:
parent
cacb973326
commit
71d682c53b
153 changed files with 21809 additions and 232 deletions
|
@ -0,0 +1,47 @@
|
|||
---
|
||||
slug: /api/misc/@docusaurus/eslint-plugin/no-html-links
|
||||
---
|
||||
|
||||
# no-html-links
|
||||
|
||||
import APITable from '@site/src/components/APITable';
|
||||
|
||||
Ensure that the Docusaurus [`<Link>`](../../../docusaurus-core.mdx#link) component is used instead of `<a>` tags.
|
||||
|
||||
The `<Link>` component has prefetching and preloading built-in. It also does build-time broken link detection, and helps Docusaurus understand your site's structure better.
|
||||
|
||||
## Rule Details {#details}
|
||||
|
||||
Examples of **incorrect** code for this rule:
|
||||
|
||||
```html
|
||||
<a href="/page">go to page!</a>
|
||||
|
||||
<a href="https://x.com/docusaurus" target="_blank">X</a>
|
||||
```
|
||||
|
||||
Examples of **correct** code for this rule:
|
||||
|
||||
```js
|
||||
import Link from '@docusaurus/Link'
|
||||
|
||||
<Link to="/page">go to page!</Link>
|
||||
|
||||
<Link to="https://x.com/docusaurus">X</Link>
|
||||
```
|
||||
|
||||
## Rule Configuration {#configuration}
|
||||
|
||||
Accepted fields:
|
||||
|
||||
```mdx-code-block
|
||||
<APITable>
|
||||
```
|
||||
|
||||
| Option | Type | Default | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `ignoreFullyResolved` | `boolean` | `false` | Set to true will not report any `<a>` tags with absolute URLs including a protocol. |
|
||||
|
||||
```mdx-code-block
|
||||
</APITable>
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue