externalLinks()
Añade los atributos rel y target a los enlaces externos en tu salida Markdown.
import { externalLinks } from "@unifast/node";Firma
function externalLinks(options?: ExternalLinksPluginOptions): UnifastPluginParámetros
options?
Configuración de los atributos de enlace externo
| Propiedad | Tipo | Por defecto | Descripción |
|---|---|---|---|
rel | string | "nofollow noopener noreferrer" | Valor del atributo rel en los enlaces externos |
target | string | — | Valor del atributo target (p. ej., “_blank”) |
Uso
import { compile, externalLinks } from "@unifast/node";
const result = compile(md, {
plugins: [
externalLinks({
rel: "nofollow noopener noreferrer",
target: "_blank",
}),
],
});