externalLinks()

अपने Markdown output में external links पर rel और target attributes जोड़ें।

import { externalLinks } from "@unifast/node";

Signature

function externalLinks(options?: ExternalLinksPluginOptions): UnifastPlugin

Parameters

options?

External link attributes के लिए Configuration

PropertyTypeDefaultविवरण
relstring"nofollow noopener noreferrer"external links पर rel attribute का value
targetstringtarget attribute का value (जैसे “_blank”)

उपयोग

import { compile, externalLinks } from "@unifast/node";

const result = compile(md, {
  plugins: [
    externalLinks({
      rel: "nofollow noopener noreferrer",
      target: "_blank",
    }),
  ],
});

उदाहरण