externalLinks()
अपने Markdown output में external links पर rel और target attributes जोड़ें।
import { externalLinks } from "@unifast/node";Signature
function externalLinks(options?: ExternalLinksPluginOptions): UnifastPluginParameters
options?
External link attributes के लिए Configuration
| Property | Type | Default | विवरण |
|---|---|---|---|
rel | string | "nofollow noopener noreferrer" | external links पर rel attribute का value |
target | string | — | target attribute का value (जैसे “_blank”) |
उपयोग
import { compile, externalLinks } from "@unifast/node";
const result = compile(md, {
plugins: [
externalLinks({
rel: "nofollow noopener noreferrer",
target: "_blank",
}),
],
});