docs: async function importPlugin({
    path,
    args,
    runEmdaer,
  }: {
    path: string,
    args: Array<*>,
    runEmdaer: boolean,
  }): Promise<string> {
    let required;
    let content;
    try {
      let modulePath;
  
      if (path.startsWith(sep)) {
        modulePath = path;
      } else if (path.startsWith(`.${sep}`) || path.startsWith(`..${sep}`)) {
        modulePath = resolve(process.cwd(), path);
      } else {
        modulePath = path;
      }
      if (COMMON_MARKDOWN_FILE_EXTS.some(ext => modulePath.endsWith(ext))) {
        const paths = getMarkdownPaths(modulePath);
        const index = (await Promise.all(paths.map(fs.pathExists))).findIndex(
          val => val
        );
        if (index < 0) {
          throw new Error(`no such file or directory ${modulePath}`);
        }
        modulePath = paths[index];
        required = (await fs.readFile(modulePath)).toString();
      } else {
        required = require(modulePath);
      }
    } catch (e) {
      throw new Error(`Unable to import provided path: ${e.message}`);
    }
    if (typeof required === 'string') {
      content = required;
    } else if (typeof required === 'function') {
      if (args) {
        content = required(...args);
      } else {
        content = required();
      }
      if (content instanceof Promise) {
        content = await content;
      }
    } else {
      throw new Error(`Exported value must either be a string or a function`);
    }
  
    return runEmdaer ? emdaer(path, content, { marked: false }) : content;
  }