code: function rewriteLink(href, renderOpts) {
      var imgRoute = renderOpts.fqImages && (renderOpts.fqImages.route || '/images/');
      var imgPrefix = renderOpts.fqImages && renderOpts.fqImages.url;
      var linkPrefix = renderOpts.fqLinks || renderOpts.relPath;
  
      if (imgPrefix && u.startsWith(href, imgRoute)) { href = imgPrefix + href; }
      else if (linkPrefix && /^\/([^/]|$)/.test(href)) { href = linkPrefix + href; }
  
      return href;
    }
docs: Link rewriting logic - shared by renderLink and renderImage and hb.fixPath