The documentation for the 'Link' component discusses its use for internal links only and suggests that 'a' is rendered differently than it is #5209
Labels
documentation
The issue is related to the documentation of Docusaurus
📚 Documentation
The documentation for the
Link
component discusses the use of theLink
component for internal links only and suggests thata
be used for external links.It contains the following comment in the example source code: "Note that external links still use 'a' tags, but automatically opens in new tab." When I tried using
a
in a React component for an external link, I found that it was rendered without attributes to open the target in a new tab.Looking at the source code for the
Link
component, it supports both internal and external links, and will render external links with attributes to open in a new tab.I think that the documentation could be updated to reflect that
Link
can be used for both internal and external links (and its behavior of adding attributes to open external links in a new tab). If that is the intended end-user accessible behavior. And I believe that thea
tag is not behaving as described in the comment quoted above.Steps to reproduce:
These are rendered as:
Have you read the Contributing Guidelines on issues?
Yes
The text was updated successfully, but these errors were encountered: