message: docs: add blank target to external links
diff: @@ -7,9 +7,31 @@ export default function addBasePath(basePath: string) {
  if (node.url.startsWith('/') && !node.url.startsWith(`${basePath}/`)) {
  node.url = `${basePath}${node.url}`;
  }
  +
  + if (node.url.startsWith('http')) {
  + addProperties(node, {
  + rel: 'noopener',
  + target: '_blank',
  + });
  + }
  });
  return ast;
  };
  };
  }
  +
  +function addProperties(node: any, props: Record<string, string>) {
  + if (!node.data) {
  + node.data = {};
  + }
  +
  + if (!node.data.hProperties) {
  + node.data.hProperties = {};
  + }
  +
  + node.data.hProperties = {
  + ...node.data.hProperties,
  + ...props,
  + };
  +}
  